whatismyip/test/Dockerfile
dcarrillo 4492f77d87
Remove docker compose from integration tests because of the testcontainers dependency nightmare (#34)
* Remove docker compose from integration tests because of the testcontainers dependency nightmare
2024-06-01 19:12:14 +02:00

16 lines
303 B
Docker

FROM golang:1.22-alpine as builder
ARG ARG_VERSION
ENV VERSION $ARG_VERSION
WORKDIR /app
COPY . .
FROM builder AS build-test-app
RUN CGO_ENABLED=0 \
go build -ldflags="-s -w" -o whatismyip ./cmd
FROM scratch AS test
COPY --from=build-test-app /app/whatismyip /usr/bin/
ENTRYPOINT ["whatismyip"]