Skip to content

Commit 72b58a4

Browse files
committed
fix: clean up docker files
1 parent c4c3576 commit 72b58a4

9 files changed

+13
-193
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ jobs:
135135
container:
136136
- "arch_node.dockerfile"
137137
- "fedora_node.dockerfile"
138-
- "ubuntu_20.04_node_legacy.dockerfile"
139-
- "ubuntu_20.04_node.dockerfile"
140-
- "ubuntu_node_legacy.dockerfile"
141138
- "ubuntu_node.dockerfile"
142139
steps:
143140
- uses: actions/checkout@v3

dev/docker/arch_node.dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
## base image
22
FROM archlinux as base
33

4-
RUN pacman -Syuu --noconfirm
5-
RUN pacman-db-upgrade
6-
7-
# install nodejs
8-
RUN pacman -S --noconfirm --needed nodejs npm git
9-
10-
# install pnpm
11-
#RUN pacman -S --noconfirm --needed pnpm
12-
RUN npm install -g pnpm
4+
# install nodejs and pnpm
5+
RUN pacman -Syuu --noconfirm && pacman-db-upgrade && pacman -S --noconfirm --needed nodejs npm git \
6+
&& npm install -g pnpm
137

148

159
#### Building

dev/docker/fedora_node.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
FROM fedora as base
33

44
# nodejs and curl for downloading setup-cpp
5-
RUN dnf -y install nodejs npm curl git
6-
7-
# install pnpm
8-
RUN npm install -g pnpm
5+
RUN dnf -y install nodejs npm curl git && dnf clean all \
6+
&& npm install -g pnpm
97

108

119
#### Building

dev/docker/ubuntu.dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
FROM ubuntu:22.04 as base
33

44
# install setup-cpp
5-
RUN apt-get update -qq && apt-get install -y --no-install-recommends npm git curl
6-
RUN npm install -g setup-cpp
7-
5+
RUN apt-get update -qq && apt-get install -y --no-install-recommends npm git curl && rm -rf /var/lib/apt/lists/* \
6+
&& npm install -g setup-cpp \
87
# install llvm, cmake, ninja, and ccache
9-
RUN setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
8+
&& setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
109

1110
CMD ["source", "~/.cpprc"]
1211
ENTRYPOINT ["/bin/bash"]

dev/docker/ubuntu_20.04_node.dockerfile

Lines changed: 0 additions & 62 deletions
This file was deleted.

dev/docker/ubuntu_20.04_node_legacy.dockerfile

Lines changed: 0 additions & 63 deletions
This file was deleted.

dev/docker/ubuntu_node.dockerfile

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

33
# install node with nvm
4-
RUN apt-get update -qq && apt-get install -y --no-install-recommends git curl wget ca-certificates
4+
RUN apt-get update -qq && apt-get install -y --no-install-recommends git curl wget ca-certificates && rm -rf /var/lib/apt/lists/*
55
ARG nvm_version="0.39.3"
66
ARG node_version="18.15.0"
7-
RUN mkdir /usr/local/nvm
87
ENV NVM_DIR /usr/local/nvm
8+
RUN mkdir $NVM_DIR
99
ADD https://raw.githubusercontent.com/nvm-sh/nvm/v${nvm_version}/install.sh /tmp/nvm_install.sh
1010
RUN chmod +x /tmp/nvm_install.sh && /tmp/nvm_install.sh \
1111
&& . $NVM_DIR/nvm.sh \
@@ -16,10 +16,7 @@ ENV NODE_PATH $NVM_DIR/v${node_version}/lib/node_modules
1616
ENV PATH $NVM_DIR/versions/node/v${node_version}/bin:$PATH
1717

1818
# install pnpm
19-
ADD https://get.pnpm.io/install.sh /tmp/pnpm_install.sh
20-
RUN chmod +x /tmp/pnpm_install.sh && bash /tmp/pnpm_install.sh
21-
ENV PNPM_HOME "/root/.local/share/pnpm"
22-
ENV PATH "${PATH}:${PNPM_HOME}"
19+
RUN npm install -g pnpm
2320

2421

2522
#### Building
@@ -35,7 +32,7 @@ FROM base AS setup-cpp
3532
# add setup-cpp.js
3633
COPY --from=builder /workspace/dist/node18 /
3734
# run installation
38-
RUN . $NVM_DIR/nvm.sh && node /setup-cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true --powershell true
35+
RUN . "${NVM_DIR}/nvm.sh" && node /setup-cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true --powershell true
3936
CMD ["source", "~/.cpprc"]
4037
ENTRYPOINT ["/bin/bash"]
4138

dev/docker/ubuntu_node_legacy.dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)