Skip to content

Commit

Permalink
bundle ssl library instead of building it into the binary for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
WaveringAna committed Jan 26, 2025
1 parent 4eae8e8 commit c5dcc41
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,25 @@ RUN npm run build
# Build Go service
FROM golang:1.21.5-alpine AS go-builder

# Install build dependencies
RUN apk add --no-cache gcc musl-dev

WORKDIR /app
COPY . .

# Enable CGO and build
ENV CGO_ENABLED=1
# Disable CGO and build
ENV CGO_ENABLED=0
RUN go build -o simplegit

# Final stage
FROM alpine:latest

# Install runtime dependencies
RUN apk add --no-cache git sqlite nodejs
# Install runtime dependencies including SSL
RUN apk add --no-cache \
git \
sqlite \
nodejs \
openssl \
ca-certificates \
libssl3 \
openssh

WORKDIR /app

Expand Down

0 comments on commit c5dcc41

Please sign in to comment.