Docker containers with C++ development environment
MIT License
❗ Please find the new repository at https://github.com/BrainTwister/docker-devel-env
Docker enables a great way for fast, small, reproducable, and portable software development environments.
The advantages are:
The docker images are structured modular with the syntax
module1
- version1
- module2
- version2
- module3
- version3
- ...
,
where image module1-version1-module2-version2-module3-version3
is using the image
module1-version1-module2-version2
as base. The name of the directory is used
as docker image label, so that it can be pulled with
docker pull bernddoser/docker-devel-cpp:module1-version1-module2-version2-module3-version3
A ready-for-action eclipse IDE with
installed can be started by
docker run -e /tmp/.X11-unix:/tmp/.X11-unix:ro -D DISPLAY bernddoser/docker-devel-cpp:ubuntu-16.04-cmake-3.10-gcc-7-conan-1.0-docker-17.12-eclipse-4.7.2
or using docker-compose by
version: "3"
services:
eclipse:
image: bernddoser/docker-devel-cpp:ubuntu-16.04-cmake-3.10-gcc-7-conan-1.0-docker-17.12-eclipse-4.7.2
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:ro
- /var/run/docker.sock:/var/run/docker.sock
- home:/home/eclipse:rw
environment:
- DISPLAY
volumes:
home:
A declarative Jenkinsfile can look like
pipeline {
agent {
docker {
image 'bernddoser/docker-devel-cpp:ubuntu-16.04-cmake-3.10-clang-6-conan-1.0'
}
}
stages {
stage('Conan') {
steps {
sh 'conan install .'
}
}
stage('CMake') {
steps {
sh 'cmake .'
}
}
stage('Build') {
steps {
sh 'make all'
}
}
stage('Test') {
steps {
sh 'make test'
}
}
}
}