Initial commit
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# Start from a Go base image
|
||||
FROM golang:latest as builder
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the source code into the container
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN go build -o mybot .
|
||||
|
||||
# Use a small base image
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
# Copy the binary from the builder stage
|
||||
COPY --from=builder /app/mybot .
|
||||
|
||||
# Command to run the executable
|
||||
CMD ["./mybot"]
|
Reference in New Issue
Block a user