mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2024-12-22 07:28:00 +00:00
22 lines
289 B
Docker
22 lines
289 B
Docker
FROM golang:1.18-alpine as builder
|
|
|
|
ARG ARG_VERSION
|
|
ENV VERSION $ARG_VERSION
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN apk add make git && make build VERSION=$VERSION
|
|
|
|
# Build final image
|
|
FROM scratch
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/whatismyip /usr/bin/
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["whatismyip"]
|