whatismyip/Dockerfile

22 lines
289 B
Docker
Raw Permalink Normal View History

FROM golang:1.18-alpine as builder
2021-11-10 19:06:12 +00:00
ARG ARG_VERSION
ENV VERSION $ARG_VERSION
2021-11-10 19:06:12 +00:00
WORKDIR /app
COPY . .
RUN apk add make git && make build VERSION=$VERSION
2021-11-10 19:06:12 +00:00
# Build final image
FROM scratch
WORKDIR /app
COPY --from=builder /app/whatismyip /usr/bin/
EXPOSE 8080
ENTRYPOINT ["whatismyip"]