Docker will Node.js and nginx installed for building static and serving static apps
550
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
Content type
Image
Digest
sha256:4719e628b…
Size
18.7 MB
Last updated
almost 11 years ago
docker pull loicmahieu/alpine-nginx-node