Make a multi-stage image work

The microsoft/dotnet:sdk image is huge, so I think this will need to be
reverted.
This commit is contained in:
R. Tyler Croy 2017-11-16 12:30:44 -08:00
parent d7aa4b01e1
commit a25cdbfd4e
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 8 additions and 11 deletions

View File

@ -1,15 +1,12 @@
FROM node:8-stretch
FROM node:8-stretch as node
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg
RUN apt-get update && apt-get install -qy apt-transport-https
ADD dotnetdev.list /etc/apt/sources.list.d/
RUN apt-get update && \
apt-get install -qy dotnet-runtime-2.0.3 &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
npm install -g \
RUN npm install -g \
azure-functions-core-tools@core --unsafe-perm true
FROM microsoft/dotnet:sdk
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node /usr/local/bin /usr/local/bin
COPY --from=node /root/.azurefunctions /root/.azurefunctions
EXPOSE 7071