From 33983caa92dd606be9b9433a92bbacb62111fefd Mon Sep 17 00:00:00 2001 From: Artur Marud Date: Tue, 12 Jul 2022 11:13:26 +0200 Subject: [PATCH] Added Dockerfile and .dockerignore Signed-off-by: Artur Marud --- .dockerignore | 3 +++ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..952247f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +*.md +test* +infra-sshfp-cf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3fffc02 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# syntax=docker/dockerfile:1 +FROM golang:1.18-alpine AS builder + +WORKDIR /app +COPY . . +RUN go mod vendor +RUN go build -mod vendor -o ./infra-sshfp-cf + + +FROM alpine:3.16.0 +ARG REVISION=bf6021c8bb34394a70ed49c7e816b0aee4140992 + +LABEL org.opencontainers.image.authors="artur@status.im" +LABEL org.opencontainers.image.source="https://github.com/status-im/sshfp-generator" +LABEL org.opencontainers.image.revision=${REVISION} + +WORKDIR /root +COPY --from=builder /app/infra-sshfp-cf ./ + +ENTRYPOINT [ "./infra-sshfp-cf" ]