Skip to content

Commit

Permalink
build: update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceunx committed Dec 4, 2024
1 parent 4561b94 commit f399cff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
FROM rust:1.83-alpine3.20 AS builder

RUN apk add --no-cache \
musl-dev \
openssl-dev \
build-base \
pkgconfig
FROM rust:1.83-bullseye AS builder

WORKDIR /app

COPY Cargo.toml Cargo.lock ./

RUN mkdir -p src && \
RUN mkdir src && \
echo "fn main() {}" > src/main.rs

RUN cargo build --release
Expand All @@ -20,12 +14,11 @@ COPY . .

RUN cargo build --release

FROM alpine:3.20
FROM debian:bullseye-slim

RUN apk add --no-cache \
openssl \
ca-certificates \
libgcc
RUN apt-get update && \
apt-get install -y openssl ca-certificates && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand Down
Empty file added README.md
Empty file.

0 comments on commit f399cff

Please sign in to comment.