Using Docker Images

Deploy applications using container images from Drycc Container Registry or external registries.

Drycc supports deploying applications using existing [Docker Images][]. This approach integrates well with Docker-based CI/CD pipelines.

Prepare an Application

Clone this example application to get started:

$ git clone https://github.com/drycc/example-dockerfile-http.git
$ cd example-dockerfile-http

Build the image and push it to DockerHub using your local Docker client:

$ docker build -t <username>/example-dockerfile-http .
$ docker push <username>/example-dockerfile-http

Docker Image Requirements

Container images must meet these requirements for successful deployment:

  • Use the EXPOSE directive to expose exactly one port for HTTP traffic.
  • Ensure your application listens for HTTP connections on that port.
  • Define the default process using the CMD directive.
  • Include bash in the container image.

Create an Application

Create an application on the controller:

$ mkdir -p /tmp/example-dockerfile-http && cd /tmp/example-dockerfile-http
$ drycc create example-dockerfile-http --no-remote
Creating application... done, created example-dockerfile-http

Deploy the Application

Deploy from DockerHub or a public registry using drycc pull:

$ drycc pull <username>/example-dockerfile-http:latest
Creating build...  done, v2

$ curl -s http://example-dockerfile-http.local3.dryccapp.com
Powered by Drycc

Drycc automatically detects container images and scales the web process type to 1 on first deployment.

Scale your application by adjusting the number of containers. For example, use drycc scale web=3 to run 3 web containers.

Private Registry

Deploy images from private registries by attaching credentials using drycc registry. Use the same credentials as docker login.

Follow these steps for private Docker images:

  1. Obtain registry credentials (such as Quay.io Robot Account or GCR.io Long Lived Token)
  2. Run drycc registry set <username> <password> -a <application-name>
  3. Use drycc pull normally against private registry images

For GCR.io Long Lived Token, compact the JSON blob using jq and use _json_key as the username:

drycc registry set _json_key "$(cat google_cloud_cred.json | jq -c .)"

When using private registries, Kubernetes manages image pulls directly. This improves security and speed, but requires setting the application port manually with drycc config set PORT=80 before configuring registry credentials.


Last modified 11.10.2025: chore(zh-cn): 优化中文文档 (931e2de)