Skip to content

Commit

Permalink
removes chowns
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 committed Apr 23, 2024
1 parent 66da116 commit 8160037
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
19 changes: 8 additions & 11 deletions images/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ ARG NPM_VERSION="10.5.2"
# Latest Rust version: https://www.rust-lang.org/
ARG RUST_VERSION="1.77.2"

USER root:root
USER root

RUN [ "$(npm --version)" = "${NPM_VERSION}" ] || npm install --verbose -g npm@${NPM_VERSION}

ARG CI_USER=root:root
USER ${CI_USER}

WORKDIR /ci

ENV CARGO_HOME=/ci/.cargo
Expand All @@ -25,19 +22,19 @@ RUN mkdir -p ${CARGO_HOME} ${RUSTUP_HOME}
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\
sh -s -- -y --default-toolchain ${RUST_VERSION}

COPY --chown=${CI_USER} ./ui/package.json .
COPY --chown=${CI_USER} ./ui/package-lock.json .
COPY ./ui/package.json .
COPY ./ui/package-lock.json .
RUN npm install --verbose

RUN mkdir wiki
RUN cd wiki &&\
cargo new ci &&\
cargo new tools &&\
cargo new wiki
COPY --chown=${CI_USER} ./Cargo.lock ./wiki/
COPY --chown=${CI_USER} ./Cargo.toml ./wiki/
COPY --chown=${CI_USER} ./ci/Cargo.toml ./wiki/ci/
COPY --chown=${CI_USER} ./tools/Cargo.toml ./wiki/tools/
COPY --chown=${CI_USER} ./wiki/Cargo.toml ./wiki/wiki/
COPY ./Cargo.lock ./wiki/
COPY ./Cargo.toml ./wiki/
COPY ./ci/Cargo.toml ./wiki/ci/
COPY ./tools/Cargo.toml ./wiki/tools/
COPY ./wiki/Cargo.toml ./wiki/wiki/
RUN cd wiki &&\
cargo fetch -vv
9 changes: 3 additions & 6 deletions images/e2e.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ FROM cypress/factory:3.5.4
# Latest NPM version: https://www.npmjs.com/package/npm
ARG NPM_VERSION="10.5.2"

USER root:root
USER root

RUN [ "$(npm --version)" = "${NPM_VERSION}" ] || npm install --verbose -g npm@${NPM_VERSION}

ARG CI_USER=root:root
USER ${CI_USER}

WORKDIR /ci
COPY --chown=${CI_USER} ./ui/package.json .
COPY --chown=${CI_USER} ./ui/package-lock.json .
COPY ./ui/package.json .
COPY ./ui/package-lock.json .
RUN npm install --verbose

0 comments on commit 8160037

Please sign in to comment.