Sign inSign up

rhrn/docker-nginx-spa

By rhrn

Updated over 6 years ago

nginx single page application static server

Image
0

1.1K

rhrn/docker-nginx-spa repository overview

nginx single page application (SPA) server

examples
Dockerfile simple example
FROM rhrn/docker-nginx-spa

COPY /app/public /usr/share/nginx/html
Dockerfile with builder example
FROM node:8.9-alpine as builder

RUN apk add --update curl && curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C /

WORKDIR /app

COPY package.json /app
COPY package-lock.json /app

RUN npm install

COPY . /app

RUN NODE_ENV=production npm run build

FROM rhrn/docker-nginx-spa

COPY --from=builder /app/public /usr/share/nginx/html
Build and run
docker build -t my-spa-app .
docker run --rm -p 8080:8080 my-spa-app
open http://localhost:8080

Tag summary

Content type

Image

Digest

Size

8.3 MB

Last updated

about 7 years ago

docker pull rhrn/docker-nginx-spa