Skip to content

Commit afb5035

Browse files
author
Kristoffel Pirard
committed
Add dockerfile for those without build infrastructure
1 parent fd25370 commit afb5035

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Prerequisite: currently I have it up and running for Visual Studio 2017 Communit
2828

2929
Open the `cpp11training/cpp11training.sln` solution.
3030

31+
### Docker host
32+
33+
If you don't want to litter your system with tools you don't trust, but you _do_ trust Docker, you can
34+
build and run the docker container in [docker](docker). You may even be in luck and simply `docker pull xtofl/cpp11training`.
35+
36+
Then, clone the repository, and start a cpp11training container. Now you can follow the steps like in Linux.
37+
38+
(windows users may be happy to find a `run_container.bat` script to help)
3139

3240
## Exercising
3341

docker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ubuntu:18.04
2+
3+
RUN apt update
4+
RUN apt install -y gcc-8 cmake
5+
RUN apt install -y vim git
6+
RUN apt install -y g++-8

docker/build-container.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build --tag cpp11training %~dp0

docker/run_container.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run -it -v "%~dp0:/cpp11training" cpptraining /bin/bash

0 commit comments

Comments
 (0)