Files
crawlab/backend/Dockerfile
Marvin Zhang 3243c2cee4 refactor: remove db module from Dockerfile and consolidate dependencies
- Removed the db module from the Dockerfile, reflecting the recent refactor that consolidates database functionality into the core/mongo package.
- This change simplifies the Docker image setup by eliminating unnecessary dependencies and improving overall project organization.
2024-12-25 10:48:28 +08:00

25 lines
506 B
Docker

FROM golang:1.22.9 AS build
# Context path is the root of the repository
WORKDIR /go/src/app
# Copy the current directory (backend) first
COPY ./backend ./backend/
# Copy required modules from relative paths
COPY ./core ./core/
COPY ./grpc ./grpc/
COPY ./trace ./trace/
COPY ./vcs ./vcs/
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