2024-07-03 02:09:15 +02:00
|
|
|
FROM golang:1.22.5-bookworm AS build
|
2023-12-19 13:56:03 +01:00
|
|
|
|
|
|
|
# Create build workspace folder
|
|
|
|
WORKDIR /workspace
|
|
|
|
ADD . /workspace
|
|
|
|
|
|
|
|
# Install updates and build tools
|
|
|
|
RUN apt-get update --yes && \
|
|
|
|
apt-get install --yes build-essential
|
|
|
|
|
|
|
|
# Build the actual binary
|
|
|
|
RUN make build
|
|
|
|
|
|
|
|
# -- -- -- -- -- --
|
|
|
|
|
|
|
|
# Set up image to run the tool
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
# Create main app folder to run from
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy built binary from build image
|
2024-01-25 13:10:01 +01:00
|
|
|
COPY --from=build /workspace/country-geo-locations /app
|
2023-12-19 13:56:03 +01:00
|
|
|
|
2024-01-25 13:10:01 +01:00
|
|
|
ENTRYPOINT ["/app/country-geo-locations"]
|