Dockerfiles optimized

This commit is contained in:
Juan Ferrer 2019-01-08 20:09:55 +01:00
parent 33b1f8b5f2
commit 9f181b15f8
2 changed files with 7 additions and 8 deletions

View File

@ -1,19 +1,20 @@
FROM debian:stretch-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg2 \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y \
&& apt-get install -y --no-install-recommends \
nodejs \
&& apt-get purge -y --auto-remove \
curl \
gnupg2 \
&& rm -rf /var/lib/apt/lists/* \
&& npm -g install pm2
WORKDIR /salix
COPY package.json package-lock.json ./
COPY loopback/package.json loopback/

View File

@ -2,12 +2,10 @@ FROM debian:stretch-slim
EXPOSE 80
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends nginx \
&& rm -rf /var/lib/apt/lists/*
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
WORKDIR /etc/nginx