Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed most of the warnings from Dockerfile when running docker build #301

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG CONFIG_FILE=config/config.yaml

## Rust builder ################################################################
# Specific debian version so that compatible glibc version is used
FROM rust:1.84.0-bullseye as rust-builder
FROM rust:1.84.0-bullseye AS rust-builder
ARG PROTOC_VERSION

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
Expand All @@ -22,7 +22,7 @@ COPY rust-toolchain.toml rust-toolchain.toml
RUN rustup component add rustfmt

## Orchestrator builder #########################################################
FROM rust-builder as fms-guardrails-orchestr8-builder
FROM rust-builder AS fms-guardrails-orchestr8-builder

COPY build.rs *.toml LICENSE /app/
COPY ${CONFIG_FILE} /app/config/config.yaml
Expand All @@ -35,20 +35,20 @@ WORKDIR /app
RUN cargo install --root /app/ --path .

## Tests stage ##################################################################
FROM fms-guardrails-orchestr8-builder as tests
FROM fms-guardrails-orchestr8-builder AS tests
RUN cargo test

## Lint stage ###################################################################
FROM fms-guardrails-orchestr8-builder as lint
FROM fms-guardrails-orchestr8-builder AS lint
RUN cargo clippy --all-targets --all-features -- -D warnings

## Formatting check stage #######################################################
FROM fms-guardrails-orchestr8-builder as format
FROM fms-guardrails-orchestr8-builder AS format
RUN cargo fmt --check

## Release Image ################################################################

FROM ${UBI_MINIMAL_BASE_IMAGE}:${UBI_BASE_IMAGE_TAG} as fms-guardrails-orchestr8-release
FROM ${UBI_MINIMAL_BASE_IMAGE}:${UBI_BASE_IMAGE_TAG} AS fms-guardrails-orchestr8-release

COPY --from=fms-guardrails-orchestr8-builder /app/bin/ /app/bin/
COPY ${CONFIG_FILE} /app/config/config.yaml
Expand All @@ -63,6 +63,6 @@ RUN groupadd --system orchestr8 --gid 1001 && \

USER orchestr8

ENV ORCHESTRATOR_CONFIG /app/config/config.yaml
ENV ORCHESTRATOR_CONFIG=/app/config/config.yaml

CMD /app/bin/fms-guardrails-orchestr8
CMD ["/app/bin/fms-guardrails-orchestr8"]