From f4a12ccbe3c043a754d24ca28cf881f84b7c0eeb Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:43:19 -0400 Subject: [PATCH] update dockerfile with rustfmt --- .gitea/workflows/check.yml | 2 +- .gitea/workflows/harmony_composer.yaml | 2 +- Dockerfile | 16 ++++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index 2014633..ae2d001 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -9,7 +9,7 @@ jobs: check: runs-on: docker container: - image: hub.nationtech.io/harmony/harmony_composer:latest + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:eb0406fcb95c63df9b7c4b19bc50ad7914dd8232ce98e9c9abef628e07c69386 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index bdb9e75..6c7bc0f 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -7,7 +7,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:eb0406fcb95c63df9b7c4b19bc50ad7914dd8232ce98e9c9abef628e07c69386 runs-on: dind steps: - name: Checkout code diff --git a/Dockerfile b/Dockerfile index 4a68932..b7b690d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,19 +10,15 @@ FROM docker.io/rust:1.87.0 WORKDIR /app +RUN rustup target add x86_64-pc-windows-gnu +RUN rustup target add x86_64-unknown-linux-gnu +RUN rustup component add rustfmt + RUN apt update -# For checkout action -RUN apt install -y nodejs - -RUN apt install -y docker.io - -RUN rustup target add x86_64-unknown-linux-gnu - -RUN apt install -y mingw-w64 -RUN rustup target add x86_64-pc-windows-gnu - # TODO: Consider adding more supported targets +# nodejs for checkout action, docker for building containers, mingw for cross-compiling for windows +RUN apt install -y nodejs docker.io mingw-w64 COPY --from=build /app/target/release/harmony_composer .