Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
summer2024:dockersetup [2024/06/29 10:17] – [Standard image setup] rajit | summer2024:dockersetup [2025/08/27 10:03] (current) – [Creating a container] rajit | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docker image and container setup ====== | ====== Docker image and container setup ====== | ||
- | We have provided a [[https:// | + | We have provided a [[https:// |
===== Standard image setup ===== | ===== Standard image setup ===== | ||
Line 20: | Line 20: | ||
</ | </ | ||
- | This starts with the pre-built Docker image '' | + | This configuration does the following: |
+ | * It starts with the pre-built Docker image '' | ||
+ | * It extends it by installing a number of packages (text editors, a window manager, VNC server, etc.) | ||
+ | | ||
+ | * It starts the ssh service so you can use ssh to connect to your docker container. | ||
+ | |||
+ | Feel free to customize this to install any software/ | ||
To build an image using the Dockerfile above (saved as Dockerfile in your working directory), run: | To build an image using the Dockerfile above (saved as Dockerfile in your working directory), run: | ||
< | < | ||
- | $ docker build -t async - < Dockerfile | + | $ docker build -t cadtools |
</ | </ | ||
- | This will use the '' | + | This will use the '' |
Line 34: | Line 40: | ||
There are many ways to start docker containers. A simple setup that we use is to have a shared directory between the container and the host machine where you are running docker, and forward port 7500 from the host machine to the ssh port (22) in the container. The following command will accomplish this. | There are many ways to start docker containers. A simple setup that we use is to have a shared directory between the container and the host machine where you are running docker, and forward port 7500 from the host machine to the ssh port (22) in the container. The following command will accomplish this. | ||
< | < | ||
- | $ docker run -d -p 7500:22 -v / | + | $ docker run -d -p 7500:22 -v / |
</ | </ | ||
The ''/ | The ''/ | ||
Line 55: | Line 61: | ||
</ | </ | ||
- | Now the local port 8500 on the host will correspond to the VNC port. You can now connect to port 8500 on your local machine using a VNC client to get a graphical desktop that is running on the container. | + | Now the local port 8500 on the host will correspond to the VNC port 5901 in the container. You can now connect to port 8500 on your local machine using a VNC client to get a graphical desktop that is running on the container. If the vnc server in the container has a different display number (e.g. :3 instead of :1), then 8500 should be forwarded to a different port number (e.g. 5903 for display :3, rather than 5901 for display :1). |
Note that once the container is setup, you don't need to re-do those steps. You can simply pause the container to stop it, and resume it when you want to re-connect to it via ssh. | Note that once the container is setup, you don't need to re-do those steps. You can simply pause the container to stop it, and resume it when you want to re-connect to it via ssh. | ||
+ | |||
+ | ===== Updating the container with the latest tools ===== | ||
+ | |||
+ | The container is not updated as frequently as the git repositories. To update the tools from within the container, use the following steps, running as '' | ||
+ | < | ||
+ | $ cd / | ||
+ | $ git pull | ||
+ | $ git submodule update --init --recursive | ||
+ | $ export ACT_HOME=/ | ||
+ | $ ./build | ||
+ | </ | ||
+ | |||
+ | The git repository for the [[: |