Added Dockerfile and .dockerignore

Signed-off-by: Artur Marud <artur@status.im>
This commit is contained in:
Artur Marud 2022-07-12 11:13:26 +02:00
parent bf6021c8bb
commit 33983caa92
No known key found for this signature in database
GPG Key ID: 3A50153F6C80C7F9
2 changed files with 23 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
*.md
test*
infra-sshfp-cf

20
Dockerfile Normal file
View File

@ -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" ]