Commands below may serve as an example how to use our Docker image to easily create a Docker container my-cge-container
, and use it quite like a virtual machine.
Treat these commands as an example, please. There are various ways of doing this. These commands are written with a Linux user in mind — on Windows you will have to adjust them.
First run a container from a console like this:
docker run --name my-cge-container --volume="${HOME}":/home/sharedhome/ -it kambi/castle-engine-cloud-builds-tools:cge-unstable bash
You can play around in the resulting shell, end by Ctrl + D (or exit
and Enter).
Note
|
We recommend using container with cge-unstable (CGE version 7.0-alpha.snapshot ), not cge-stable (CGE version 7.0-alpha.3 ) in most cases. As the engine grows fast lately — for most users using latest CGE snapshot is better (and it is, in practice, very stable — we test it a lot).
|
Next time, enter this container like this:
docker start my-cge-container --attach --interactive
# The above command is basically a shortcut for:
#docker start my-cge-container # make container running
#docker attach my-cge-container # attach to the new "bash" process inside
To remove the container from your system:
docker rm my-cge-container
Inside the container, you have a regular Linux command-line.
-
Try commands like fpc -l
or castle-engine --version
to make sure you have FPC and CGE inside the container.
-
Try ls /home/sharedhome/
to make sure you see your shared directory, if you followed the above example usage of --volume
.
-
You can install whatever you need (apt-get install ...
works), and just use it as a regular virtual machine.
-
Example above shows using --volume
option for docker run
to share your $HOME directory. You can also copy files between host/container using docker cp
( https://docs.docker.com/engine/reference/commandline/cp/ ).