file_system/Dockerfile
root 0beb859c54 Update Dockerfile to use private registry for alpine base image
- Changed FROM alpine:latest to FROM 192.168.1.154:31010/alpine:latest
- Added push-images.bat script to help push base images to private registry
- Ensures all CI/CD pipeline uses consistent registry sources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:36:04 +08:00

38 lines
812 B
Docker

# Build Stage
FROM 192.168.1.154:31010/alpine:latest AS builder
WORKDIR /app
# Install Go
RUN apk add --no-cache go
# Copy go mod and sum files
COPY go.mod go.sum ./
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
# Build the Go app
RUN go build -o server ./cmd/server
# Run Stage
FROM 192.168.1.154:31010/alpine:latest
WORKDIR /app
# Copy the Pre-built binary from the previous stage
COPY --from=builder /app/server .
# Copy web resources
COPY --from=builder /app/web ./web
# Copy docs
COPY --from=builder /app/docs ./docs
# Expose port 8080 to the outside world
EXPOSE 8080
# Command to run the executable
CMD ["./server"]