adorsys/nginx Docker Image
adorsys/nginx是基于官方nginx:alpine的Nginx基础镜像,推荐使用ubi版本,支持rootless环境(默认端口8080),提供entrypoint钩子机制,适用于部署静态文件(如前端应用)。
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
dockerfileFROM 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
bashif [ -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
dockerfileFROM adorsys/nginx COPY dist/ . COPY angular-url.sh /docker-entrypoint.d/
The current directory points to the web http root directory.
Tags
| Name | Description | Size |
|---|---|---|
| centos | Based on https://github.com/sclorg/nginx-container 1.16 | |
| alpine | Based on https://hub.docker.com/_/nginx | |
| ubi | Based on RHEL8 UBI | |
| latest | Alias for ubi |
adorsys 命名空间的其他可用镜像:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务