Skip to content

Use Dragonwell 21 docker images

lvfei.lv edited this page Nov 28, 2023 · 1 revision

Naming convention of Dragonwell images

Below are Docker images published on Aliyun and DockerHub.

${DRAGONWELL_VERSION}-${EDITION}-${OPT}-${OS}(-slim)?
  • DOCKER REPOSITORY: dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell or registry.hub.docker.com/alibabadragonwell/dragonwell
  • DRAGONWELL_VERSION: such as 21.0.1.0.1.12, you can also write the latest version number 21 which will point to the latest version.
  • EDITION: standard
  • OPT: ga\d+
  • OS: anolis/centos/ubuntu/alpine
  • slim: the image whose tag has -slim postfix is specially trimmed for smaller image size, and its functionality may be incomplete for your application

Current supported platforms

Dragonwell OS Architecture Edition
17 centos amd64,arm64 standard
17 ubuntu amd64,arm64 standard
17 anolis amd64,arm64 standard
17 alpine amd64,arm64 standard

List of Dragonwell images

https://hub.docker.com/r/alibabadragonwell/dragonwell/tags

Dockerfile of image

https://github.com/dragonwell-releng/dragonwell-containers

Pull the image

For example(if the current latest version is 21.0.1.0.1+12:

# 17.0.4.0.4.8-extended-ga-anolis
docker pull dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21
docker pull dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21-anolis
docker pull dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21-standard-ga-anolis
docker pull dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21.0.1.0.1.12-standard-ga-anolis

Run in command line

Just like other images

$ sudo docker run -v $PWD:$PWD -it --rm dragonwell-registry.cn-hangzhou.aliyuncs.com/dragonwell/dragonwell:21.0.1.0.1.12-standard-ga-anolis /bin/sh

FROM as base image

Just change the FROM line like below:

FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21.0.1.0.1.12-standard-ga-anolis
# balabala...

Get JDK from image

COPY --from=dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21.0.1.0.1.12-standard-ga-anolis /opt/java/openjdk /opt