From b9c32f5f1e33a7d69c114e66bb259cca7d6ca7b1 Mon Sep 17 00:00:00 2001 From: John Cairns Date: Tue, 14 Nov 2023 11:39:41 -0600 Subject: [PATCH] 1: adding fmt and clippy to the toolchain - includes rust-analyzer --- .github/workflows/ci-image.yml | 3 ++- CHANGELOG.md | 6 ++++++ Dockerfile | 11 ++++++++--- README.md | 1 - 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-image.yml b/.github/workflows/ci-image.yml index 461c119..2493c5b 100644 --- a/.github/workflows/ci-image.yml +++ b/.github/workflows/ci-image.yml @@ -35,7 +35,8 @@ jobs: uses: docker/build-push-action@v3 with: context: . - platforms: linux/amd64 push: false build-args: | VERSION=latest + tags: | + ${{ github.event.repository.name }}:${{ github.sha }} diff --git a/CHANGELOG.md b/CHANGELOG.md index abb73dc..b225e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +1.0.1 (2023-11-14) + +* add fmt +* add clippy +* add rust-analyzer + 1.0.0 (2023-11-08) * initial rust container diff --git a/Dockerfile b/Dockerfile index 0a24876..d96f25f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,12 +65,17 @@ ENV PATH ${NVM_NODE_PATH}/bin:$PATH RUN npm install npm -g RUN npm install yarn -g - +ENV USER=xmtp ## Rust from builder -COPY --chown=xmtp:xmtp --from=builder /home/xmtp/.cargo /home/xmtp/.cargo -COPY --chown=xmtp:xmtp --from=builder /home/xmtp/.rustup /home/xmtp/.rustup +COPY --chown=${USER}:${USER} --from=builder /home/${USER}/.cargo /home/${USER}/.cargo +COPY --chown=${USER}:${USER} --from=builder /home/${USER}/.rustup /home/${USER}/.rustup +ENV PATH=/home/${USER}/.cargo/bin:$PATH USER xmtp +RUN rustup toolchain install stable +RUN rustup component add rustfmt +RUN rustup component add clippy +RUN rustup component add rust-analyzer LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="rust" \ diff --git a/README.md b/README.md index 5e819d3..137be08 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Everything needed to Rust and Protocol buffers from stable toolchain. - BuildKit TARGETARCH `$ DOCKER_BUILDKIT=1 docker build . -t ... ` - ## arm64 To build locally, run: