From acb5fbf1628910d3db4e6bb9c0324368754e6b91 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 26 Apr 2022 22:52:01 -0700 Subject: [PATCH] docker: source ~/.cpprc in the builder step [skip test] --- README.md | 2 +- dev/docker/ubuntu.dockerfile | 5 +++-- dev/docker/ubuntu_node.dockerfile | 5 +++-- dev/docker/ubuntu_stable_node.dockerfile | 5 +++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 42797ea4..c07397f1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/dev/docker/ubuntu.dockerfile b/dev/docker/ubuntu.dockerfile index 127d5937..cc091a9a 100644 --- a/dev/docker/ubuntu.dockerfile +++ b/dev/docker/ubuntu.dockerfile @@ -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 diff --git a/dev/docker/ubuntu_node.dockerfile b/dev/docker/ubuntu_node.dockerfile index 8ec3fa64..fbfd84d8 100644 --- a/dev/docker/ubuntu_node.dockerfile +++ b/dev/docker/ubuntu_node.dockerfile @@ -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 diff --git a/dev/docker/ubuntu_stable_node.dockerfile b/dev/docker/ubuntu_stable_node.dockerfile index 8b3d9734..21d1910c 100644 --- a/dev/docker/ubuntu_stable_node.dockerfile +++ b/dev/docker/ubuntu_stable_node.dockerfile @@ -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