Skip to content

Instantly share code, notes, and snippets.

@salrashid123
Created January 28, 2018 08:00
Show Gist options
  • Save salrashid123/7d3d091d48dac08f71b5126108c353e9 to your computer and use it in GitHub Desktop.
Save salrashid123/7d3d091d48dac08f71b5126108c353e9 to your computer and use it in GitHub Desktop.
Dockerfile
FROM node:8.9.1 AS build-env-node
ADD . /user_code
WORKDIR /user_code
RUN npm install --save local_modules/execer
FROM microsoft/dotnet:2.0.0-sdk AS build-env-dotnet
ADD . /user_code
WORKDIR /user_code
RUN mkdir -p /user_code/lib && \
for i in `dpkg -L libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu57 liblttng-ust0 libssl1.0.2 libstdc++6 libunwind8 libuuid1 zlib1g | egrep "^/usr/lib/x86_64-linux-gnu/.*\.so\."`; do cp $i /user_code/lib; done
FROM gcr.io/distroless/dotnet
WORKDIR /user_code
ADD . /user_code
COPY --from=build-env-node /user_code/node_modules /user_code/node_modules
COPY --from=build-env-dotnet /user_code/lib /user_code/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment