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:
parent
d7aa4b01e1
commit
a25cdbfd4e
19
Dockerfile
19
Dockerfile
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue