test: use ubuntu in docker images

This commit is contained in:
Amin Yahyaabadi 2022-02-15 00:25:37 -08:00
parent 76832b81a5
commit 43cff6e966
5 changed files with 9 additions and 23 deletions

View File

@ -178,8 +178,7 @@ jobs:
Here is an example for using setup_cpp to make a builder image that has the Cpp tools you need. Here is an example for using setup_cpp to make a builder image that has the Cpp tools you need.
```dockerfile ```dockerfile
# debian FROM ubuntu:devel
FROM debian:bullseye
# add setup_cpp # add setup_cpp
WORKDIR "/" WORKDIR "/"
@ -202,7 +201,7 @@ See [this folder](https://github.com/aminya/setup-cpp/tree/master/building/docke
If you want to build the ones included, then run: If you want to build the ones included, then run:
```ps1 ```ps1
docker build -f ./building/docker/debian.dockerfile -t setup_cpp . docker build -f ./building/docker/ubuntu.dockerfile -t setup_cpp .
``` ```
Where you should use the path to the dockerfile after `-f`. Where you should use the path to the dockerfile after `-f`.
@ -242,7 +241,7 @@ The following gives an example for setting up a C++ environment inside GitLab pi
.gitlab-ci.yaml .gitlab-ci.yaml
```yaml ```yaml
image: ubuntu:latest image: ubuntu:devel
stages: stages:
- test - test

View File

@ -1,14 +0,0 @@
# a tiny debian with node installed
FROM node:16-slim
# add setup_cpp.js
ADD "./dist/" "/"
WORKDIR "/"
# run installation
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true --vcpkg true
# reload the environment
CMD source ~/.profile
ENTRYPOINT [ "/bin/sh" ]

View File

@ -1,5 +1,4 @@
# debian FROM ubuntu:devel
FROM debian:bullseye
# add setup_cpp # add setup_cpp
WORKDIR "/" WORKDIR "/"

View File

@ -1,5 +1,7 @@
# debian with node installed FROM ubuntu:devel
FROM node:16
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends nodejs
# add setup_cpp.js # add setup_cpp.js
ADD "./dist/" "/" ADD "./dist/" "/"

View File

@ -13,7 +13,7 @@
}, },
"scripts": { "scripts": {
"build": "cross-env NODE_ENV=production parcel build --detailed-report && npm run copy.matchers", "build": "cross-env NODE_ENV=production parcel build --detailed-report && npm run copy.matchers",
"build.docker": "pnpm build && docker build -f ./building/docker/debian_node.dockerfile -t setup_cpp .", "build.docker": "pnpm build && docker build -f ./building/docker/ubuntu_node.dockerfile -t setup_cpp .",
"bump": "ncu -u -x execa", "bump": "ncu -u -x execa",
"clean": "shx rm -rf .parcel-cache dist exe", "clean": "shx rm -rf .parcel-cache dist exe",
"copy.matchers": "shx cp ./src/gcc/gcc_matcher.json ./dist/ && shx cp ./src/msvc/msvc_matcher.json ./dist && shx cp ./src/python/python_matcher.json ./dist/ && shx cp ./src/llvm/llvm_matcher.json ./dist/ ", "copy.matchers": "shx cp ./src/gcc/gcc_matcher.json ./dist/ && shx cp ./src/msvc/msvc_matcher.json ./dist && shx cp ./src/python/python_matcher.json ./dist/ && shx cp ./src/llvm/llvm_matcher.json ./dist/ ",