-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi as chef | ||
|
||
RUN curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs > rustup-init.sh && \ | ||
sh rustup-init.sh --default-toolchain "1.79" --profile minimal -y && \ | ||
source "$HOME/.bashrc" && \ | ||
dnf install clang -y | ||
|
||
ENV PATH="$PATH:/root/.cargo/bin" | ||
|
||
RUN cargo install cargo-chef --locked --version "0.1.67" && \ | ||
rm -rf $CARGO_HOME/registry/ | ||
|
||
|
||
|
||
FROM chef AS planner | ||
WORKDIR /planner | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
|
||
|
||
FROM chef AS builder | ||
WORKDIR /builder | ||
COPY --from=planner /planner/recipe.json recipe.json | ||
# Build dependencies | ||
RUN cargo chef cook --release --recipe-path recipe.json | ||
# Build application | ||
COPY . . | ||
RUN cargo build --bin iam --release | ||
|
||
|
||
|
||
FROM registry.access.redhat.com/ubi9/ubi-micro | ||
WORKDIR /app | ||
COPY --from=builder /builder/target/release/iam ./ | ||
CMD ["./iam"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
version: '3' | ||
|
||
services: | ||
database: | ||
image: mysql:8.0 | ||
image: docker.io/mysql:8.0 | ||
environment: | ||
MYSQL_DATABASE: iam | ||
MYSQL_USER: iam | ||
MYSQL_PASSWORD: secret | ||
MYSQL_ROOT_PASSWORD: secret | ||
TZ: Europe/Budapest | ||
ports: | ||
- "3306:3306" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi as chef | ||
|
||
RUN curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs > rustup-init.sh && \ | ||
sh rustup-init.sh --default-toolchain "1.79" --profile minimal -y && \ | ||
source "$HOME/.bashrc" && \ | ||
dnf install clang -y | ||
|
||
ENV PATH="$PATH:/root/.cargo/bin" | ||
|
||
RUN cargo install cargo-chef --locked --version "0.1.67" && \ | ||
rm -rf $CARGO_HOME/registry/ | ||
|
||
|
||
|
||
FROM chef AS planner | ||
WORKDIR /planner | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
|
||
|
||
FROM chef AS builder | ||
WORKDIR /builder | ||
COPY --from=planner /planner/recipe.json recipe.json | ||
# Build dependencies | ||
RUN cargo chef cook --release --recipe-path recipe.json | ||
# Build application | ||
COPY . . | ||
RUN cargo build --bin iam-migration --release | ||
|
||
|
||
|
||
FROM registry.access.redhat.com/ubi9/ubi-micro | ||
WORKDIR /app | ||
COPY --from=builder /builder/target/release/iam-migration ./ | ||
CMD ["./iam-migration"] |
This file was deleted.
Oops, something went wrong.