File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 92
92
- " ubuntu_node.dockerfile"
93
93
- " ubuntu_20.04_node.dockerfile"
94
94
- " arch_node.dockerfile"
95
+ - " fedora_node.dockerfile"
95
96
node :
96
97
- 14
97
98
pnpm :
Original file line number Diff line number Diff line change @@ -7,17 +7,18 @@ RUN pacman-db-upgrade
7
7
# nodejs
8
8
RUN pacman -S --noconfirm --needed nodejs
9
9
10
+ # curl for downloading setup-cpp
11
+ RUN pacman -S --noconfirm --needed curl
12
+
10
13
# add setup_cpp.js
11
14
COPY "./dist/" "/"
12
15
WORKDIR "/"
13
16
14
17
# run installation
15
- RUN pacman -S --noconfirm --needed curl
16
18
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true
17
19
18
20
# clean up
19
21
RUN pacman -Scc --noconfirm
20
- # RUN rm -rf /home/yay/.cache/*
21
22
RUN rm -rf /tmp/*
22
23
23
24
CMD source ~/.cpprc
Original file line number Diff line number Diff line change
1
+ # # base image
2
+ FROM fedora as base
3
+
4
+ RUN dnf -y check-update
5
+
6
+ # nodejs
7
+ RUN dnf -y install nodejs
8
+
9
+ # curl for downloading setup-cpp
10
+ RUN dnf -y install curl
11
+
12
+ # add setup_cpp.js
13
+ COPY "./dist/" "/"
14
+ WORKDIR "/"
15
+
16
+ # run installation
17
+ RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true
18
+
19
+ # clean up
20
+ RUN rm -rf /tmp/*
21
+
22
+ CMD source ~/.cpprc
23
+ ENTRYPOINT [ "/bin/bash" ]
24
+
25
+ # ### Building
26
+ FROM base AS builder
27
+ COPY ./dev/cpp_vcpkg_project /home/app
28
+ WORKDIR /home/app
29
+ RUN bash -c 'source ~/.cpprc \
30
+ && task build'
31
+
32
+ # ## Running environment
33
+ # use a distroless image or ubuntu:22.04 if you wish
34
+ FROM gcr.io/distroless/cc
35
+ # copy the built binaries and their runtime dependencies
36
+ COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
37
+ WORKDIR /home/app/
38
+ ENTRYPOINT ["./my_exe" ]
You can’t perform that action at this time.
0 commit comments