chibisafe-netproxy/Dockerfile

27 lines
623 B
Docker
Raw Permalink Normal View History

2024-04-11 09:37:01 +00:00
# syntax=docker/dockerfile:1
2024-04-11 11:38:54 +00:00
FROM golang:1.22
2024-04-11 09:37:01 +00:00
# Set destination for COPY
WORKDIR /app
2024-04-11 09:37:01 +00:00
# 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/reference/dockerfile/#copy
COPY . .
2024-04-11 09:37:01 +00:00
# Build
RUN go build -o /chibisafe_proxy
2024-04-11 09:37:01 +00:00
# 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/reference/dockerfile/#expose
EXPOSE 4040
2024-04-11 09:37:01 +00:00
# Run
CMD ["/chibisafe_proxy"]