build: 💚 minimize container
This commit is contained in:
parent
b28908ec56
commit
f48cd5783e
1 changed files with 15 additions and 7 deletions
22
Dockerfile
22
Dockerfile
|
@ -1,7 +1,15 @@
|
|||
FROM rust:1.77.2-alpine3.18
|
||||
COPY Cargo.toml ./
|
||||
COPY src ./src
|
||||
RUN apk update
|
||||
RUN apk add musl-dev
|
||||
RUN cargo build --release
|
||||
CMD [ "/target/release/acapair_follow_ban_api"]
|
||||
FROM linuxcontainers/debian-slim:latest
|
||||
|
||||
#COPY Cargo.toml ./
|
||||
#COPY src ./src
|
||||
COPY target/release/acapair_follow_ban_api .
|
||||
#RUN apk add --no-cache musl-dev curl gcc
|
||||
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
# ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
# RUN cargo build --release
|
||||
# RUN cp /target/release/acapair_follow_ban_api .
|
||||
# RUN cargo clean
|
||||
# RUN rustup self uninstall -y
|
||||
# RUN apk del musl-dev curl gcc
|
||||
# RUN rm Cargo.lock
|
||||
CMD [ "./acapair_follow_ban_api"]
|
Loading…
Add table
Add a link
Reference in a new issue