Dockerfile: cargo install peazyrsa from git
This commit is contained in:
parent
944d6c3013
commit
75a5e3740f
14
Dockerfile
14
Dockerfile
@ -5,16 +5,8 @@ RUN cargo install trunk
|
|||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM chef AS planner-peazyrsa
|
|
||||||
RUN git clone https://gitea.b4tman.ru/b4tman/peazyrsa -b v0.1.0 --depth 1 .
|
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
|
||||||
|
|
||||||
FROM chef AS builder-peazyrsa
|
FROM chef AS builder-peazyrsa
|
||||||
COPY --from=planner-peazyrsa /app/recipe.json recipe.json
|
RUN cargo install --git https://gitea.b4tman.ru/b4tman/peazyrsa --tag v0.1.0
|
||||||
RUN cargo chef cook --release --recipe-path recipe.json
|
|
||||||
RUN git clone https://gitea.b4tman.ru/b4tman/peazyrsa -b v0.1.0 --depth 1 peazyrsa
|
|
||||||
RUN cp -af peazyrsa/* . && rm -rf peazyrsa
|
|
||||||
RUN cargo build --release
|
|
||||||
|
|
||||||
FROM chef AS planner-peasyweb
|
FROM chef AS planner-peasyweb
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -36,7 +28,7 @@ RUN apk add --no-cache openssl libssl3 libcrypto3
|
|||||||
RUN mkdir -p /app/frontend
|
RUN mkdir -p /app/frontend
|
||||||
RUN mkdir /data
|
RUN mkdir /data
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder-peazyrsa /app/target/release/peazyrsa /usr/local/bin/peazyrsa
|
COPY --from=builder-peazyrsa /usr/local/cargo/bin/peazyrsa /usr/local/bin/peazyrsa
|
||||||
COPY --from=builder-peasyweb /app/target/release/peazyweb-backend /usr/local/bin/peazyweb-backend
|
COPY --from=builder-peasyweb /app/target/release/peazyweb-backend /usr/local/bin/peazyweb-backend
|
||||||
COPY --from=builder-peasyweb /app/frontend/dist/ /app/frontend
|
COPY --from=builder-peasyweb /app/frontend/dist/ /app/frontend
|
||||||
|
|
||||||
@ -53,4 +45,4 @@ ENV ROCKET_PORT=80
|
|||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/peazyweb-backend"]
|
ENTRYPOINT ["/usr/local/bin/peazyweb-backend"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user