첫 커밋: 로컬 프로젝트 업로드
This commit is contained in:
21
baron-sso/backend/Dockerfile
Normal file
21
baron-sso/backend/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM golang:1.26.2-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install git for go mod download if needed
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Pre-copy go.mod/sum to cache dependencies
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Build for production (optional, can just run go run for dev)
|
||||
RUN go build -o main ./cmd/server
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Default command (can be overridden by compose)
|
||||
CMD ["./main"]
|
||||
Reference in New Issue
Block a user