Files
crawlab/backend/Dockerfile
Marvin Zhang 3b9b3115a3 chore: update Go base image version in Dockerfile
- Changed the base image from golang:1.22.9 to golang:1.23 to leverage the latest features and improvements.
- Ensured alignment with existing coding standards and maintained consistency in the Dockerfile structure.
2025-04-10 17:41:56 +08:00

25 lines
504 B
Docker

FROM golang:1.23 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