Skip to content

Commit 088ef83

Browse files
committed
chore: update setup-cpp in dockerfiles
1 parent 995537c commit 088ef83

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ Here is an example for using setup-cpp to make a builder image that has the Cpp
162162
FROM ubuntu:22.04 AS base
163163

164164
# add setup-cpp
165-
WORKDIR "/"
166-
RUN apt-get update -qq
167-
RUN apt-get install -y --no-install-recommends wget
168-
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.26.1/setup-cpp-x64-linux"
169-
RUN chmod +x ./setup-cpp-x64-linux
165+
RUN apt-get update && apt-get install -y \
166+
npm \
167+
&& rm -rf /var/lib/apt/lists/*
168+
RUN npm install -g setup-cpp
170169

171170
# install llvm, cmake, ninja, and ccache
172-
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
171+
RUN setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
173172

174173
CMD source ~/.cpprc
175174
ENTRYPOINT [ "/bin/bash" ]

dev/docker/ubuntu.dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#### Base Image
22
FROM ubuntu:22.04 AS base
33

4-
# add setup-cpp
5-
WORKDIR "/"
6-
RUN apt-get update -qq
7-
RUN apt-get install -y --no-install-recommends wget
8-
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.26.1/setup-cpp-x64-linux"
9-
RUN chmod +x ./setup-cpp-x64-linux
4+
# install setup-cpp
5+
RUN apt-get update && apt-get install -y \
6+
npm \
7+
&& rm -rf /var/lib/apt/lists/*
8+
RUN npm install -g setup-cpp
109

1110
# install llvm, cmake, ninja, and ccache
12-
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
11+
RUN setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
1312

1413
CMD source ~/.cpprc
1514
ENTRYPOINT [ "/bin/bash" ]

dev/docker/ubuntu_node.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM ubuntu:22.04 AS base
22

3-
RUN apt-get update -qq
4-
RUN apt-get install -y --no-install-recommends nodejs
3+
RUN apt-get update && apt-get install -y \
4+
nodejs \
5+
&& rm -rf /var/lib/apt/lists/*
56

67
# add setup-cpp.js
78
COPY "./dist/node12" "/"

0 commit comments

Comments
 (0)