90DaysOfDevOps/2023/day2-ops-code/synchronous/generator/Dockerfile
Alistair Hey 4ff8c158a9
Add 2023 day 84 What is an API
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2023-03-24 14:46:31 +00:00

18 lines
362 B
Docker

# Set the base image to use
FROM golang:1.17-alpine
# Set the working directory inside the container
WORKDIR /app
# Copy the source code into the container
COPY . .
# Build the Go application
RUN go build -o main .
# Expose the port that the application will run on
EXPOSE 8080
# Define the command that will run when the container starts
CMD ["/app/main"]