-
Notifications
You must be signed in to change notification settings - Fork 44
GitlabCIDeps
Kelly (KT) Thompson edited this page Aug 15, 2018
·
7 revisions
We currently use docker to generate the Ubuntu OS image used for Travis-based CI testing. Instructions for creating the docker image are here:
-
Install Docker
- Download the docker installer
- I installed Docker on Windows 10 by following these intructions: https://docs.docker.com/docker-for-windows/?utm_source=docker4win_18.03.1-ce-win65
- As an 'Administrator' class user
- Install as
WIN/r<z#>
user. - Add
WIN/<z#>
to user groupdocker_users
. - Run docker --> settings to adjust max image size and to set http_proxy (if needed).
- Install as
-
Create an account on dockerhub.com.
-
Primer/How-to
- Ref: https://www.techrepublic.com/article/how-to-create-a-docker-image-and-push-it-to-docker-hub/
- Start a CMD shell
- Start with a basic OS image:
docker pull ubuntu:latest
, or try the ci image:docker pull kinetictheory/draco-travis-ci
- Use the image for an interactive Linux session:
docker run --name draco-travis-ci -it ubuntu:latest /bin/bash -l
- Once the image has been modified, save the changes:
docker commit -m "Installed newer cmake" -a <docker-moniker> docker-travis-ci <docker-moniker>/draco-travis-ci:latest
- Now that the changes are queued for upload. When ready finish uploading to dockerhub.com:
-
docker login
(provide docker-moniker and password) docker push <docker-moniker>/draco-travis-ci
-
-
Examine the existing CI image.
- Download the current image:
-
docker login -u <docker-moniker>
(and provide password) - `docker pull kinetictheory/draco-travis-ci
-
- Run an interactive session:
docker run -it kinetictheory/draco-travis-ci /bin/bash -l
- Run a script inside the docker image while accessing local files:
docker run -it -v c:/myworkdir/draco::/home/travis/draco -w /home/travis/draco kinetictheory/draco-travis-ci /bin/bash -l -c ./.travis-run-tests.sh
- Download the current image:
-
Look at locally available images:
docker ps -a [-q]
docker rm <hash>
docker kill <image-name>
-
Build an image based on a Dockerfile script found in CWD.
docker build --rm --pull --tag draco-travis-ci:latest .
- Example: https://github.com/lanl/Draco/blob/develop/regression/Dockerfile