rename Dockerfile and copy all files
All checks were successful
build-docker-imge / Build the docker container (push) Successful in 5m36s

This commit is contained in:
2024-08-27 18:28:10 +02:00
parent 1e41dd833f
commit 0f07ccb94f
2 changed files with 3 additions and 3 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# syntax=docker/dockerfile:1
FROM golang:1.23.0
# Set destination for COPY
WORKDIR /app
# Download Go modules
COPY go.mod go.sum ./
RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
COPY ./ ./
# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o /szuntis-backend
# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
# But we can document in the Dockerfile what ports
# the application is going to listen on by default.
# https://docs.docker.com/engine/reference/builder/#expose
EXPOSE 3000
# Run
CMD ["/szuntis-backend"]