-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 1019 Bytes
/
Dockerfile
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 rust:1.78-alpine3.20 as builder
RUN apk add --no-cache \
alpine-sdk \
libressl-dev \
bash
RUN cargo install --version=0.7.4 sqlx-cli --no-default-features --features rustls,postgres
RUN cargo install --version=0.1.48 cargo-udeps
RUN cargo install --version=0.30.0 cargo-tarpaulin
RUN cargo install --version=1.0.9 cargo-sort
FROM rust:1.78-alpine3.20
RUN apk update \
&& apk upgrade --available \
&& apk add --no-cache \
alpine-sdk \
libressl-dev \
bash \
ca-certificates \
gnupg
RUN rm -rf /var/cache/apk/*
COPY --from=builder /usr/local/cargo/bin/cargo-tarpaulin /usr/local/cargo/bin/cargo-tarpaulin
COPY --from=builder /usr/local/cargo/bin/cargo-udeps /usr/local/cargo/bin/cargo-udeps
COPY --from=builder /usr/local/cargo/bin/sqlx /usr/local/cargo/bin/sqlx
COPY --from=builder /usr/local/cargo/bin/cargo-sort /usr/local/cargo/bin/cargo-sort
RUN rustup component add clippy
ADD .docker/cacert.pem /usr/local/share/ca-certificates/my.crt
RUN update-ca-certificates