forked from rendora/rendora
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (22 loc) · 658 Bytes
/
Dockerfile
File metadata and controls
35 lines (22 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM golang:1.25-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git make
WORKDIR /app
# Copy go mod and sum files first for better caching
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the source code
COPY . .
# Build the application
RUN make build
FROM alpine:latest
# Install runtime dependencies
RUN apk --no-cache add ca-certificates curl
# Create a non-root user
RUN addgroup -S rendora && adduser -S rendora -G rendora
WORKDIR /rendora
# Copy the binary from the builder stage
COPY --from=builder /app/cmd/rendora/rendora /usr/bin/rendora
# Use the non-root user
USER rendora
ENTRYPOINT ["rendora"]