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