Implement everything else from JS

This commit is contained in:
2024-01-26 15:25:16 +01:00
parent fac474a58b
commit 3b83d85d7e
4 changed files with 174 additions and 5 deletions

30
dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# syntax=docker/dockerfile:1
FROM golang:1.22-rc-alpine
# 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
# May not be enough for complex projects
COPY *.go ./
# Build
# Add GOOS=linux for linux
# GOOS=windows
# GOOS=darwin
RUN go build -o /main
# 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 8080
# Run
CMD ["/main"]