mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-27 04:53:50 +03:00
Add intermediate container to hide ARGs
ARGs contain secrets to speed up builds
This commit is contained in:
parent
3e03787551
commit
8d66428beb
1 changed files with 13 additions and 2 deletions
|
@ -1,10 +1,21 @@
|
|||
FROM valkum/docker-rust-ci:latest
|
||||
FROM valkum/docker-rust-ci:latest as builder
|
||||
WORKDIR /build
|
||||
|
||||
ARG RUSTC_WRAPPER
|
||||
ARG AWS_ACCESS_KEY_ID
|
||||
ARG AWS_SECRET_ACCESS_KEY
|
||||
ARG SCCACHE_BUCKET
|
||||
ARG SCCACHE_ENDPOINT
|
||||
ARG SCCACHE_S3_USE_SSL
|
||||
|
||||
COPY . .
|
||||
RUN cargo build
|
||||
|
||||
FROM valkum/docker-rust-ci:latest
|
||||
WORKDIR /build
|
||||
COPY --from=builder /build/target/debug/conduit /conduit
|
||||
|
||||
ENV SERVER_NAME=localhost
|
||||
EXPOSE 14004 8448
|
||||
|
||||
CMD sed "s/server_name: your.server.name/server_name: ${SERVER_NAME}/g" Rocket-example.toml Rocket.toml && ./target/debug/conduit
|
||||
CMD sed "s/server_name: your.server.name/server_name: ${SERVER_NAME}/g" Rocket-example.toml Rocket.toml && /conduit
|
Loading…
Reference in a new issue