Spaces:
Build error
Build error
File size: 595 Bytes
2f734ec a5509a5 54bede1 2f734ec 54bede1 2f734ec 9ebe8bc d447bd4 2f734ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Use an official golang runtime as a parent image
FROM golang:1.21
# Set the working directory in the container to /app
WORKDIR /app
# Copy go.mod and go.sum files to the workspace
COPY go.mod go.sum ./
# Download all dependencies. They will be cached if the go.mod and go.sum files are not changed
RUN go mod download
# Copy the source code into the container
COPY . .
# Build the application
RUN go build -o /usr/local/bin/chisel github.com/jpillora/chisel
# Expose port 8080 for the chisel server
EXPOSE 8080
# Command to run the executable
CMD ["chisel", "server", "--port", "8080"]
|