mirror of
https://github.com/minoplhy/chibisafe-netproxy.git
synced 2024-12-22 10:08:08 +00:00
fix: Dockerfile
This commit is contained in:
parent
83e4b41be5
commit
449b455d24
22
Dockerfile
22
Dockerfile
@ -1,11 +1,27 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:latest
|
||||
|
||||
# Set destination for COPY
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
# 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 . .
|
||||
|
||||
# Build
|
||||
RUN go build -o /chibisafe_proxy
|
||||
|
||||
# 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
|
||||
|
||||
CMD ["go", "run", "main.go"]
|
||||
# Run
|
||||
CMD ["/chibisafe_proxy"]
|
12
docker-compose.build.yml
Normal file
12
docker-compose.build.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "4040:4040"
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
- CHIBISAFE_BASEPATH=
|
||||
- MAX_UPLOAD_SIZE=
|
@ -2,7 +2,7 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
image: ghcr.io/minoplhy/chibisafe-netproxy:latest
|
||||
ports:
|
||||
- "4040:4040"
|
||||
volumes:
|
||||
|
Loading…
Reference in New Issue
Block a user