- update: docker base containers to use alpine. This drops the final containers from ~100mb to ~17mb
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
FROM rust:1.83-slim-bookworm AS builder
|
||||
FROM alpine:3 AS builder
|
||||
LABEL authors="raven"
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install --no-install-recommends --assume-yes \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
protobuf-compiler \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --no-cache rust cargo openssl-dev protoc
|
||||
|
||||
WORKDIR /usr/src/utils
|
||||
COPY ./utils .
|
||||
@@ -20,14 +14,9 @@ COPY ./character-service .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
FROM alpine:3
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install --no-install-recommends --assume-yes \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --no-cache libssl3 libgcc
|
||||
|
||||
COPY --from=builder /usr/src/character-service/target/release/character-service /usr/local/bin/character-service
|
||||
|
||||
|
||||
Reference in New Issue
Block a user