Skip to content

Commit

Permalink
fixup! fix: improve the default dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shanduur committed Nov 15, 2024
1 parent 696f867 commit 6278fdd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
FROM docker.io/library/rust:1.80-alpine AS builder

# Update Alpine packages and install build dependencies
RUN apk update && apk add --no-cache --virtual .build-dependencies \
musl-dev \
protobuf \
protobuf-dev
RUN apk update && \
apk add --no-cache --virtual .build-dependencies \
musl-dev \
protobuf \
protobuf-dev && \
apk add --no-cache \
llvm-libunwind

# Copy the source code into the image
COPY . /usr/src/sozu
WORKDIR /usr/src/sozu

# Build the application in release mode with a frozen lockfile
RUN cargo vendor --locked
RUN cargo build --release --frozen

# Stage 2: Create the runtime environment
Expand Down

0 comments on commit 6278fdd

Please sign in to comment.