nginx

adorsys/nginx Docker Image

自动构建

adorsys/nginx是基于官方nginx:alpine的Nginx基础镜像,推荐使用ubi版本,支持rootless环境(默认端口8080),提供entrypoint钩子机制,适用于部署静态文件(如前端应用)。

下载次数: 0状态:自动构建维护者:adorsys仓库类型:镜像最近更新:
下载命令
点击查看

adorsys/nginx

https://hub.docker.com/r/adorsys/nginx/

Description

Provides nginx. If possible use the ubi flavor based on the official https://hub.docker.com/_/nginx docker image.

For secure rootless environments nginx listen on port 8080 by default.

Example Dockerfile

Copy your files to distribute just to .. It points the web root directory of the nginx container

dockerfile
FROM adorsys/nginx

COPY dist/ .

Entrypoint hooks

If you need to run addition logic on container start, e.g. correct backend url for angular you can just copy your shell script to /docker-entrypoint.d/.

Before you do this manually, checkout best-practice example how to run angular apps inside docker without modify the source at container start: https://github.com/adorsys/example-angular

Example

angular-url.sh

bash
if [ -f main.js ]; then
  sed -i -e \
    's#___SB_BACKEND_URL___#'"$BACKEND_URL"'#g' \
    main.js
else
  sed -i -e \
    's#___SB_BACKEND_URL___#'"$BACKEND_URL"'#g' \
    main.*.js
fi
dockerfile
FROM adorsys/nginx

COPY dist/ .
COPY angular-url.sh /docker-entrypoint.d/

The current directory points to the web http root directory.

Tags

NameDescriptionSize
centosBased on https://github.com/sclorg/nginx-container 1.16
alpineBased on https://hub.docker.com/_/nginx
ubiBased on RHEL8 UBI
latestAlias for ubi

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 nginx 镜像标签

docker pull docker.xuanyuan.run/adorsys/nginx:<标签>

DockerHub 原生拉取命令

docker pull adorsys/nginx:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告