mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
- Updated GitHub Actions workflow to specify the Dockerfile location and set the build context to the root of the repository. - Modified Dockerfile to copy backend and other required modules from their respective directories, improving the build process.
26 lines
522 B
Docker
26 lines
522 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 ./db ./db/
|
|
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
|