This repository has been archived on 2022-08-18. You can view files and clone it, but cannot push or open issues or pull requests.
rageshake-webhook/Dockerfile
realaravinth c00cf3d8f1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: bin name in docker container
2022-08-17 19:36:48 +05:30

30 lines
948 B
Docker

FROM rust:latest as planner
RUN cargo install cargo-chef
WORKDIR /src
COPY . /src/
RUN cargo chef prepare --recipe-path recipe.json
FROM rust:latest as cacher
WORKDIR /src/
RUN cargo install cargo-chef
COPY --from=planner /src/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
FROM rust:latest as rust
WORKDIR /src
COPY . .
COPY --from=cacher /src/target target
#COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/
RUN cargo --version
#RUN make cache-bust
RUN cargo build --release
FROM debian:bullseye as rwhook
LABEL org.opencontainers.image.source https://git.batsense.net/realaravinth/rwhook
RUN useradd -ms /bin/bash -u 1001 rwhook
WORKDIR /home/rwhook
COPY --from=rust /src/target/release/rwhook /usr/local/bin/
#COPY --from=rust /src/config/default.toml /etc/rwhook/config.toml
RUN mkdir /var/lib/rwhook && chown rwhook:rwhook /var/lib/rwhook
USER rwhook
CMD [ "/usr/local/bin/rwhook" ]