chore: update setup-cpp in dockerfiles

This commit is contained in:
abeimler 2023-01-18 11:52:47 +01:00
parent 995537c5e7
commit 088ef837cc
3 changed files with 14 additions and 15 deletions

View File

@ -162,14 +162,13 @@ Here is an example for using setup-cpp to make a builder image that has the Cpp
FROM ubuntu:22.04 AS base
# add setup-cpp
WORKDIR "/"
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends wget
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.26.1/setup-cpp-x64-linux"
RUN chmod +x ./setup-cpp-x64-linux
RUN apt-get update && apt-get install -y \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g setup-cpp
# install llvm, cmake, ninja, and ccache
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
RUN setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
CMD source ~/.cpprc
ENTRYPOINT [ "/bin/bash" ]

View File

@ -1,15 +1,14 @@
#### Base Image
FROM ubuntu:22.04 AS base
# add setup-cpp
WORKDIR "/"
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends wget
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.26.1/setup-cpp-x64-linux"
RUN chmod +x ./setup-cpp-x64-linux
# install setup-cpp
RUN apt-get update && apt-get install -y \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g setup-cpp
# install llvm, cmake, ninja, and ccache
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
RUN setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
CMD source ~/.cpprc
ENTRYPOINT [ "/bin/bash" ]

View File

@ -1,7 +1,8 @@
FROM ubuntu:22.04 AS base
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends nodejs
RUN apt-get update && apt-get install -y \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# add setup-cpp.js
COPY "./dist/node12" "/"