From 8a83b259f13611f920345c0a1cc329cc8b4f7617 Mon Sep 17 00:00:00 2001 From: DataHearth Date: Tue, 8 Feb 2022 15:34:15 +0100 Subject: [PATCH] add docker image --- .dockerignore | 1 + Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1de5659 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..41cb8b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM rust:1.58 as builder + +WORKDIR /app +COPY . . + +RUN cargo install --path . + +FROM debian:buster-slim + +LABEL maintainer="Antoine Langlois" +LABEL repository="https://github.com/DataHearth/clear-docker-images" +LABEL org.opencontainers.image.source="https://github.com/DataHearth/clear-docker-images" + +RUN apt-get update && \ + # apt-get -qy full-upgrade && \ + apt-get install -qy curl && \ + curl -sSL https://get.docker.com/ | sh + +COPY --from=builder /usr/local/cargo/bin/clear-docker-images /usr/local/bin/clear-docker-images + +VOLUME ["/var/run/docker.sock"] + +ENTRYPOINT ["clear-docker-images"] \ No newline at end of file