@@ -32,7 +32,7 @@ The package can be used locally or from CI services like GitHub Actions. Stay tu
32
32
33
33
# Usage
34
34
35
- ## From Terminal
35
+ # From Terminal
36
36
37
37
You should download the exe file or the js file (if have Nodejs installed), and run it with the available options.
38
38
@@ -83,7 +83,7 @@ wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1/setup_cpp.js"
83
83
sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
84
84
```
85
85
86
- ## Inside GitHub Actions
86
+ # Inside GitHub Actions
87
87
88
88
Here is a complete cross-platform example that tests llvm and gcc. It also uses cmake, ninja, conan, cppcheck, and ccache.
89
89
@@ -128,6 +128,32 @@ In the `compiler` entry, you can specify the version after a `-`. For example, `
128
128
129
129
For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
130
130
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
+
131
157
### Incomplete
132
158
133
159
- [ ] msvc. It is implemented, but has bugs. See [ this issue] ( https://github.com/aminya/cpp/issues/1 )
0 commit comments