22 lines
452 B
Docker
22 lines
452 B
Docker
# Stage 1: Build the Go application
|
|
FROM golang:latest AS go_builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./main /app/main
|
|
|
|
# Stage 2: Create the final image with Python 3 and the Go binary
|
|
# Python is needed for the group tasks
|
|
FROM python:3
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy the Go binary from the previous stage
|
|
COPY --from=go_builder /app/main /app/main
|
|
|
|
COPY ./public/swagger/ /app/swagger
|
|
|
|
# Set up any Python dependencies you might need
|
|
# RUN pip install ...
|
|
|
|
CMD ["./main"] |