Add Dockerfile
This commit is contained in:
parent
28d5fd71fb
commit
c9745d292e
2 changed files with 26 additions and 0 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
.idea
|
||||||
|
.git
|
||||||
|
target
|
||||||
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
FROM rust:1.77.2-alpine3.19 as builder
|
||||||
|
|
||||||
|
RUN rustup --version
|
||||||
|
|
||||||
|
RUN rustup show
|
||||||
|
|
||||||
|
RUN apk add pkgconfig openssl-dev musl-dev
|
||||||
|
|
||||||
|
WORKDIR /usr/src/rust-twitch-avatar-cache
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
ENV RUSTFLAGS='-C target-feature=-crt-static'
|
||||||
|
|
||||||
|
RUN cargo install --verbose --path .
|
||||||
|
|
||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
RUN apk add --no-cache libgcc
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local/cargo/bin/rust-twitch-avatar-cache /usr/local/bin/rust-twitch-avatar-cache
|
||||||
|
|
||||||
|
CMD ["rust-twitch-avatar-cache"]
|
||||||
Loading…
Add table
Reference in a new issue