FROM microsoft/dotnet:1.0.3-sdk-projectjson RUN rm -rf /var/log/* COPY ./backend/ /tmp/backend/ ENV WEBAPI_PROJECT WebTest ENV BUILD_CONFIG Release RUN cd /tmp/backend && \ dotnet restore && \ mkdir /var/www && \ cd /tmp/backend/${WEBAPI_PROJECT} && \ dotnet publish --output /var/www && \ ln -s /var/www/${WEBAPI_PROJECT}.dll /var/www/__RUN_ME.DLL &&\ rm /tmp/backend -rf COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./run.sh /run.sh EXPOSE 80 CMD ["/run.sh"]