@@ -32,7 +32,7 @@ The package can be used locally or from CI services like GitHub Actions. Stay tu
3232
3333# Usage
3434
35- ## From Terminal
35+ # From Terminal
3636
3737You should download the exe file or the js file (if have Nodejs installed), and run it with the available options.
3838
@@ -83,7 +83,7 @@ wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1/setup_cpp.js"
8383sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
8484```
8585
86- ## Inside GitHub Actions
86+ # Inside GitHub Actions
8787
8888Here is a complete cross-platform example that tests llvm and gcc. It also uses cmake, ninja, conan, cppcheck, and ccache.
8989
@@ -128,6 +128,32 @@ In the `compiler` entry, you can specify the version after a `-`. For example, `
128128
129129For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
130130
131+ # Inside Docker
132+
133+ Here is an example for using setup_cpp to make a builder image that has the cpp tools you need.
134+
135+ ``` dockerfile
136+ # debian with node installed
137+ FROM node:16
138+
139+ # add setup_cpp.js
140+ WORKDIR "/"
141+ RUN wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1/setup_cpp.js"
142+
143+ # install llvm, cmake, ninja, ccache, and conan
144+ RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
145+
146+ ENTRYPOINT [ "/bin/bash" ]
147+ ```
148+
149+ See [ this folder] ( https://github.com/aminya/setup-cpp/tree/master/building/docker ) , for some dockerfile examples.
150+
151+ If you want to build the ones included, then run (after ` -f ` use the docker file name):
152+
153+ ``` ps1
154+ docker build -f ./building/docker/linux.dockerfile -t setup_cpp .
155+ ```
156+
131157### Incomplete
132158
133159- [ ] msvc. It is implemented, but has bugs. See [ this issue] ( https://github.com/aminya/cpp/issues/1 )
0 commit comments