Sign inSign up

loicmahieu/alpine-nginx-node

By loicmahieu

Updated almost 11 years ago

Docker will Node.js and nginx installed for building static and serving static apps

Image
1

550

loicmahieu/alpine-nginx-node repository overview

Docker image: alpine-nginx-node

Example:

FROM loicmahieu/alpine-nginx-node

RUN apk --update add git make gcc g++ python

RUN mkdir -p /tmp/build-app
COPY package.json /tmp/build-app/package.json
RUN cd /tmp/build-app && \
    npm install
COPY . /tmp/build-app
RUN cd /tmp/build-app && \
    npm run build && \
    mv /tmp/build-app/build /app && \
    apk del git make gcc g++ python && \
    rm -rf /tmp/* \
           /var/cache/apk/* && \
    /usr/bin/uninstall_node
WORKDIR /app

#### NGINX CONF
COPY ./nginx/nginx.conf /etc/nginx/conf/nginx.conf

EXPOSE 80

Tag summary

Content type

Image

Digest

sha256:4719e628b

Size

18.7 MB

Last updated

almost 11 years ago

docker pull loicmahieu/alpine-nginx-node