Files
crawlab/backend/Dockerfile
Marvin Zhang 83b81c8353 chore: update Docker configuration and ignore files
- Updated .dockerignore to exclude temporary files, Git directories, and Node modules.
- Modified Dockerfile to copy required modules from the parent directory and build the Go application from the backend directory.
2024-12-20 12:10:23 +08:00

17 lines
324 B
Docker

FROM golang:1.22.9 AS build
WORKDIR /go/src/app
# Copy all required modules from parent directory
COPY .. .
ENV GO111MODULE on
# Build from the backend directory which contains the main.go
RUN cd backend && go install -v ./...
FROM alpine:3.14
# Copy the built binary
COPY --from=build /go/bin/crawlab /go/bin/crawlab