mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-27 03:48:52 +03:00
22 lines
553 B
Docker
22 lines
553 B
Docker
FROM node:14.16.0 as frontend
|
|
|
|
LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha
|
|
|
|
WORKDIR /src
|
|
COPY package.json yarn.lock ./
|
|
RUN yarn install
|
|
COPY . .
|
|
RUN yarn build
|
|
|
|
FROM rust:latest as rust
|
|
COPY --from=frontend /src /src
|
|
WORKDIR /src
|
|
RUN cargo build --release
|
|
|
|
FROM debian:buster
|
|
RUN useradd -ms /bin/bash -u 1001 mcaptcha
|
|
WORKDIR /home/mcaptcha
|
|
COPY --from=rust /src/target/release/mcaptcha /usr/local/bin/
|
|
COPY --from=rust /src/config/default.toml /etc/mcaptcha/config.toml
|
|
USER mcaptcha
|
|
CMD [ "/usr/local/bin/mcaptcha" ]
|