Files
fibonacci/docker/Dockerfile
Rens Houben 90bf0bcb73
Some checks failed
Fibonacci unit tests / Containerize (push) Failing after 10s
Fibonacci unit tests / Run-unit-tests (push) Successful in 16s
Still not working
2025-08-11 14:59:03 +02:00

21 lines
338 B
Docker

FROM golang:1.23-bookworm AS base
# /build is the working directory
WORKDIR /build
# Copy control files and pull in dependencies
COPY code/go.mod .
RUN go mod download
ENV port=8089
# Copy the rest of the source code into the container
COPY code/* .
# Build the app
RUN go build -o fibonacci
EXPOSE ${port}
CMD ["build/fibonacci"]