Skip to content

Instantly share code, notes, and snippets.

@anryko
Created December 12, 2017 10:04
Show Gist options
  • Save anryko/4fa8773f60f12e0ddf84146a1ae86c7c to your computer and use it in GitHub Desktop.
Save anryko/4fa8773f60f12e0ddf84146a1ae86c7c to your computer and use it in GitHub Desktop.
Run gcc make build in a docker container producing executable on a local filesystem.
Change dir to source directory and run:
$ docker run \
-it \
--rm \
--name gcc \
-v $PWD:/mnt \
-p 9090:9090 \
gcc bash -c 'cd /mnt && make && ./a.out'
Kill the container when you done:
$ docker kill gcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment