ddmal/rodan-clientThis repository contains Docker images that can be used to set up Rodan locally for development. These images can also be used in the future with slight modifications for deployment to a production environment.
First, download and install Docker for your platform. If Docker is not supported on your platform (e.g. macOS older than 10.10.3, Windows older than 10 Pro, or unsupported hardware), use Docker Toolbox instead. If you're using Docker Toolbox, see specific instructions below.
After Docker is installed, clone this repository on your computer and run the following command:
shelldocker login
Enter the DDMAL credentials for Docker Hub (contact the lab manager if you don't know them) to save them on your computer. You only need to do this once.
To run Rodan, run the following command in the repository's main directory:
shelldocker-compose up
That's it! Docker will automatically spawn all the containers needed to run Rodan, rodan-client and their dependencies. Point your browser to https://localhost:9002 to view the Rodan web interface. The username is rodan with the password rodan. The Rodan REST API is accessible at https://localhost:8000. If needed, you may observe the log output of the Rodan containers in the terminal window where docker-compose is running. When you are finished, quit docker-compose using Ctrl+C.
Docker Toolbox doesn't expose container ports on localhost, it exposes them on the Docker host's IP address instead, which you can get using the following command:
shelldocker-machine ip default
In order to get the Rodan web interface to find the Rodan server, add an entry to your hosts file redirecting localhost to the Docker host's IP address. The hosts file can be found at /etc/hosts on macOS and c:\Windows\System32\Drivers\etc\hosts on Windows. Add the following entry, replacing the IP address with the output from the above command:
192.168.xxx.xxx localhost
A Docker container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. A container is different from a virtual machine: it is more lightweight and portable because it virtualizes the operating system instead of hardware.
Rodan's Docker setup is comprised of 5 container images:
rodan - the Rodan server providing a REST API.rodan-client - a web interface for Rodan.postgres-plpython - the PostgreSQL database used by the Rodan server, with the Python extensions installed.redis - a key-value database used by the Rodan server to manage websocket connections. TODO: Do we actually use this? (matangover)rabbitmq - a message queue used as a backend for celery, a Python library used by Rodan for job management.rodan, rodan-client and postgres-plpython each have a Dockerfile in this repository. For redis and rabbitmq we use existing public images from the Docker Hub. The docker-compose.yml file specifies the dependencies between the container images and combines them to set a complete Rodan installation.
rodan-client and postgres-plpython are public repositories on GitHub and Docker Hub, but rodan-docker on GitHub and rodan on Docker Hub are private. They must be private because they contain Kakadu, a proprietary software package that is licensed to DDMAL. In the future we might create a separate public version of the rodan image without Kakadu.
If you wish to work on Rodan or rodan-client and test your changes locally, you have a few options. The docker-compose setup is modular, so you could choose which parts of it you want to take and which you want to override with your local changes.
If you wish to work on rodan-client without modifying Rodan, you may run rodan-client locally and have it connect to the Rodan server run by docker-compose. rodan-client doesn't have many dependencies so it's simple to set up that way.
configuration.json from rodan-docker/rodan-client/config to your own clone of rodan-client. If you want to use your own configuration, make sure it's connected to the Rodan server launched by docker-compose:json{ "SERVER_HOST": "localhost", "SERVER_PORT": 8000 }
docker-compose up rodan (instead of just docker-compose up) to run Rodan and its dependencies without running rodan-client.gulp as instructed in the Deploy step of the rodan-client setup instructions.You could set up Rodan and its dependencies locally (like described for rodan-client above), but since Rodan has many dependencies that could be a pain to install, a better option would be to clone the Rodan code locally and mount it into the Docker container that already has all the dependencies installed. To run the Rodan stack with the local development version of Rodan:
Make sure Rodan is cloned into rodan-docker/rodan/code/rodan - see Git Submodule Setup below. (You can also use a Rodan clone from a different path, with minor adjustments to the following steps.)
Copy rodan-docker/rodan/code/settings.py.development to rodan-docker/rodan/code/rodan/rodan/settings.py. Note that this settings file does not include any job types other than the default. To enable more job types you must install the jobs into rodan-docker/rodan/code/rodan/rodan/jobs and add them to RODAN_JOB_PACKAGES in settings.py.
Run docker-compose -f docker-compose.yml -f docker-compose.rodan-dev.yml up
When running docker-compose, Docker will mount your local version of the code into the container, overwriting the version of Rodan that's included in the image.
For more information about volumes in Docker, see Use volumes in the Docker documentation. See also the docs for the volumes section of the docker-compose.yml file.
Sometimes it can be useful to inspect files or processes running inside containers. To get a list of running containers, run docker ps. To copy files between the container and the host, use docker cp.
To run any command on a running container, use docker exec. For example, to run bash on the Rodan container launched by docked-compose, run:
shelldocker exec -it rodandocker_rodan_1 bash
Consult the documentation of the Docker command line for additional information.
This repository uses the Git submodules mechanism to include all the libraries needed to set up Rodan. Git submodules are essentially pointers to other Git repositories, and are specified in the .gitmodules file.
Cloning the submodules is necessary only if you wish to rebuild the Docker images. When using graphical Git clients such as GitHub Desktop or SourceTree, the submodules are usually automatically cloned for you. When cloning on the command line, run the following command after git clone to clone the submodules as well:
shellgit submodule update --init
When you update an upstream repository, e.g. Rodan or rodan-client, the changes will not be reflected in this repository (and hence, in the Docker images) until you pull the changes in. In order to pull a new version of Rodan, for example, run the following commands:
shell# Pull the submodule changes. The branch name must be specified explicitly. cd rodan/code/rodan git pull origin master # Commit and push the changes to the parent repository (docker-rodan). cd ../.. git add rodan/code/rodan git commit -m "Update the rodan submodule" git push
If you change Rodan or rodan-client, or wish to change something in the way they are installed, you may build new versions of the Docker images, use them locally and eventually publish them. To build a new version of the rodan image, for example, run the following commands from the repository's main directory:
shelldocker build -t ddmal/rodan rodan
The build operation will take into account any changes you have made to rodan/Dockerfile or to any files it depends on. Depending on your changes, the build might take a long time to complete.
After an image is built, you may create a container using that image using docker run rodan. Refer to Docker's Get Started documentation for a more complete guide.
When you're happy with an image and want to publish it to the Docker Hub, run docker push, e.g. docker push ddmal/rodan.
Docker Cloud can automatically build new Docker images when new commits are pushed to a Git repository. Unfortunately, we had problems connecting the rodan-docker GitHub repository to Docker Cloud due to authentication issues, so we set up a private repository on Bitbucket instead.
Every time a new commit is pushed to the Bitbucket repository on the master branch, Docker Cloud will build the Rodan Docker images automatically. To push to the Bitbucket repo, first add it as a remote to your local clone:
git remote add bitbucket [***]
(The password for ddmaldocker on Bitbucket is the same as the password for ddmal on Docker Hub.)
After you're finished committing your changes to the master branch, push to the GitHub remote (origin) as usual, and then also push to to the bitbucket remote:
git push bitbucket master
This will trigger an automated build of the rodan, rodan-client and postgres-plpython images on the Docker Cloud servers. You may monitor the build results on Docker Cloud using the ddmal account credentials.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务