Skip to content

Commit

Permalink
fix PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed Aug 14, 2024
1 parent a613db3 commit 30a40ef
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docker/ci.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
# force bash to run in interactive mode so nvm is loaded
RUN sed -i 's/[ -z "$PS1" ] && return/# [ -z "$PS1" ] && return/' ~/.bashrc
SHELL [ "/bin/bash", "-e", "-c" ]

VOLUME /repo
Expand Down Expand Up @@ -44,16 +42,27 @@ RUN apt-get update
RUN apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
RUN source ~/.bashrc && nvm install 20 && nvm use 20

RUN pipx install ansible

RUN pip install ruff

ENV NVM_DIR="/root/.nvm"
ENV RUSTUP_HOME="/root/.cargo"
ENV CARGO_HOME="/root/.cargo"
ENV PATH="$CARGO_HOME/bin:$PATH"

# force bash to run in interactive mode so nvm is loaded
RUN sed -i 's/\[ -z "$PS1" \] \&\& return/# \[ -z "$PS1" \] \&\& return/' ~/.bashrc

RUN source ~/.bashrc && nvm install 20 && nvm use 20

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.77

ENV PATH="$NVM_DIR/versions/node//v20.16.0/bin:$PATH"

RUN rm -rf /var/lib/apt/lists/*

RUN echo "alias pip='pip3'" >> ~/.bashrc

ENTRYPOINT [ "/bin/bash", "-euxo", "pipefail" ]
ENTRYPOINT [ "/bin/bash", "-e" ]

0 comments on commit 30a40ef

Please sign in to comment.