Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michel Roelofs
dt_ctrl
Commits
a41e9da5
Commit
a41e9da5
authored
Apr 11, 2021
by
Michel Roelofs
Browse files
Describe how to use Docker for the consoledemo
parent
dd4b4123
Changes
1
Hide whitespace changes
Inline
Side-by-side
Docker.md
0 → 100644
View file @
a41e9da5
Docker for running a consoledemo
================================
Dockerfile
----------
The file Docker container is built in two stages:
1.
Setup a build environment, containing all essential build packages. It
clones the "dijkema" git tree and uses the default branch ("jeroen").
2.
Setup the execution environment. The artefacts from the build environment
are copied in here, a non-root user is created, and the demo is started.
Creating a Docker image
-----------------------
To run the image locally on your pc, build the docker image named
'consoledemo':
```
shell
docker build
--tag
consoledemo .
```
Then run it:
```
shell
docker run
-it
-p
8000:8000 consoledemo
```
Uploading to the container registry
-----------------------------------
It's also possible to upload the container image to the container registry, so
that it can be used by others.
Instead of creating a tag "consoledemo", create a tag like
`gitlabregistry.camras.nl:5050/<user>/dt_ctrl:<version>`
, for example
`gitlabregistry.camras.nl:5050/michel/dt_ctrl:20210427`
With
`docker login
gitlabregistry.camras.nl:5050`
you can login to the registry (please pay
attention to the warnings on storing your credentials), and then push the
image:
`docker push gitlabregistry.camras.nl:5050/<user>/dt_ctrl:<version>`
.
Todo
----
Build the container from a gitlab ci-cd pipeline. So instead of executing the
git-pull in the docker file, prepare a container image to be used by the
gitlab ci-cd, and the gitlab runner will then populate the source tree in the
build environment. Ideally this pipeline will then create a tar file or .deb
Debian package for installing on the console and controller, and also a
docker image for a consoledemo.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment