mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 01:45:50 +03:00
Docker build
This commit is contained in:
parent
4df220edad
commit
d0c5ffb486
1 changed files with 3 additions and 12 deletions
15
Dockerfile
15
Dockerfile
|
@ -6,26 +6,17 @@ WORKDIR /src
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
COPY . .
|
COPY . .
|
||||||
# RUN set -ex; \
|
|
||||||
# apt-get update; \
|
|
||||||
# DEBIAN_FRONTEND=noninteractive \
|
|
||||||
# apt-get install -y --no-install-recommends yarnpkg npm ca-certificates make libssl-dev; \
|
|
||||||
# rm -rf /var/lib/apt/lists/*
|
|
||||||
# RUN pwd
|
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM rust:latest as rust
|
FROM rust:latest as rust
|
||||||
COPY --from=frontend /src /src
|
COPY --from=frontend /src /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN pwd
|
|
||||||
RUN ls
|
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
FROM debian:buster
|
FROM debian:buster
|
||||||
RUN useradd -ms /bin/bash -u 1001 guard
|
RUN useradd -ms /bin/bash -u 1001 guard
|
||||||
WORKDIR /home/guard
|
WORKDIR /home/guard
|
||||||
COPY --from=rust /src/target/release/guard /home/guard/app/
|
COPY --from=rust /src/target/release/guard /usr/local/bin/
|
||||||
COPY --from=rust /src/config /home/guard/app/
|
COPY --from=rust /src/config/default.toml /etc/guard/config.toml
|
||||||
USER guard
|
USER guard
|
||||||
WORKDIR /home/guard/app
|
CMD [ "/usr/local/bin/guard" ]
|
||||||
CMD [ "/home/guard/app/guard" ]
|
|
||||||
|
|
Loading…
Reference in a new issue