Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created June 21, 2021 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mic92/7ae91f5f0239acb56c67535c683f1bc1 to your computer and use it in GitHub Desktop.
Save Mic92/7ae91f5f0239acb56c67535c683f1bc1 to your computer and use it in GitHub Desktop.
FROM summerwind/actions-runner:latest
ARG GCC_VERSION=10
ARG RUST_VERSION=1.51.0
RUN sudo apt update -y \
&& sudo apt install -y pkg-config libfuse-dev fuse bison flex cmake automake meson libprotobuf-dev protobuf-compiler libgflags-dev gcc-${GCC_VERSION} g++-${GCC_VERSION} \
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} \
15 \
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_VERSION} \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-${GCC_VERSION} \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-${GCC_VERSION} \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-${GCC_VERSION} \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-${GCC_VERSION} \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-${GCC_VERSION} \
&& sudo rm -rf /var/lib/apt/lists/*
ENV PATH="/home/runner/.cargo/bin:${PATH}"
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_VERSION --no-modify-path
# currently there is no way to pin this... let's hope for the best
RUN rustup toolchain install nightly
# this is using the unstable nix branch because it allows installation without systemd
RUN curl -sL https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210604_8e6ee1b/install > /dev/shm/install && sh /dev/shm/install --daemon || true
ADD /entrypoint-extra ./entrypoint-extra
RUN sudo sed -i -e '/exec/e cat ./entrypoint-extra' /entrypoint.sh && sudo rm /entrypoint-extra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment