docker: source ~/.cpprc in the builder step [skip test]

This commit is contained in:
Amin Yahyaabadi 2022-04-26 22:52:01 -07:00
parent e379435d81
commit acb5fbf162
4 changed files with 10 additions and 7 deletions

View File

@ -194,7 +194,7 @@ RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true
# activate cpp environment variables
RUN source ~/.cpprc
ENTRYPOINT [ "/bin/sh" ]
ENTRYPOINT [ "/bin/bash" ]
```
See [this folder](https://github.com/aminya/setup-cpp/tree/master/dev/docker), for some dockerfile examples.

View File

@ -12,13 +12,14 @@ RUN chmod +x ./setup_cpp_linux
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
CMD source ~/.cpprc
ENTRYPOINT [ "/bin/sh" ]
ENTRYPOINT [ "/bin/bash" ]
#### Building
FROM base AS builder
ADD ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN make build
RUN bash -c 'source ~/.cpprc \
&& make build'
### Running environment
FROM gcr.io/distroless/cc

View File

@ -11,13 +11,14 @@ WORKDIR "/"
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --make true
CMD source ~/.cpprc
ENTRYPOINT [ "/bin/sh" ]
ENTRYPOINT [ "/bin/bash" ]
#### Building
FROM base AS builder
ADD ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN make build
RUN bash -c 'source ~/.cpprc \
&& make build'
### Running environment
FROM gcr.io/distroless/cc

View File

@ -19,13 +19,14 @@ WORKDIR "/"
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --make true
CMD source ~/.cpprc
ENTRYPOINT [ "/bin/sh" ]
ENTRYPOINT [ "/bin/bash" ]
#### Building
FROM base AS builder
ADD ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN make build
RUN bash -c 'source ~/.cpprc \
&& make build'
### Running environment
FROM gcr.io/distroless/cc