Skip to content

Commit acb5fbf

Browse files
committed
docker: source ~/.cpprc in the builder step [skip test]
1 parent e379435 commit acb5fbf

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true
194194
# activate cpp environment variables
195195
RUN source ~/.cpprc
196196

197-
ENTRYPOINT [ "/bin/sh" ]
197+
ENTRYPOINT [ "/bin/bash" ]
198198
```
199199

200200
See [this folder](https://github.com/aminya/setup-cpp/tree/master/dev/docker), for some dockerfile examples.

dev/docker/ubuntu.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ RUN chmod +x ./setup_cpp_linux
1212
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
1313

1414
CMD source ~/.cpprc
15-
ENTRYPOINT [ "/bin/sh" ]
15+
ENTRYPOINT [ "/bin/bash" ]
1616

1717
#### Building
1818
FROM base AS builder
1919
ADD ./dev/cpp_vcpkg_project /home/app
2020
WORKDIR /home/app
21-
RUN make build
21+
RUN bash -c 'source ~/.cpprc \
22+
&& make build'
2223

2324
### Running environment
2425
FROM gcr.io/distroless/cc

dev/docker/ubuntu_node.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ WORKDIR "/"
1111
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --make true
1212

1313
CMD source ~/.cpprc
14-
ENTRYPOINT [ "/bin/sh" ]
14+
ENTRYPOINT [ "/bin/bash" ]
1515

1616
#### Building
1717
FROM base AS builder
1818
ADD ./dev/cpp_vcpkg_project /home/app
1919
WORKDIR /home/app
20-
RUN make build
20+
RUN bash -c 'source ~/.cpprc \
21+
&& make build'
2122

2223
### Running environment
2324
FROM gcr.io/distroless/cc

dev/docker/ubuntu_stable_node.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ WORKDIR "/"
1919
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --make true
2020

2121
CMD source ~/.cpprc
22-
ENTRYPOINT [ "/bin/sh" ]
22+
ENTRYPOINT [ "/bin/bash" ]
2323

2424
#### Building
2525
FROM base AS builder
2626
ADD ./dev/cpp_vcpkg_project /home/app
2727
WORKDIR /home/app
28-
RUN make build
28+
RUN bash -c 'source ~/.cpprc \
29+
&& make build'
2930

3031
### Running environment
3132
FROM gcr.io/distroless/cc

0 commit comments

Comments
 (0)