Skip to content

Base image for distribute static files and SPAs.

License

Notifications You must be signed in to change notification settings

adorsys-containers/nginx

Repository files navigation

adorsys/nginx

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

Description

Provides nginx. If possible use the ubi flavor based on the official nginx:alpine 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

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

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
FROM 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 RH SCL nginx 1.16
alpine Based on nginx:alpine
ubi Based on RHEL8 UBI
latest Alias for ubi

About

Base image for distribute static files and SPAs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published