FROM microsoft/dotnet:1.0.3-sdk-projectjson RUN rm -rf /var/log/* COPY ./WebSem/ /tmp/backend/ ARG WEBAPI_PROJECT=WebApi ARG BUILD_CONFIG=Release RUN echo "Building ${WEBAPI_PROJECT} in ${BUILD_CONFIG} configuration" && \ cd /tmp/backend && \ dotnet restore && \ mkdir /var/www && \ cd /tmp/backend/${WEBAPI_PROJECT} && \ dotnet publish --configuration "${BUILD_CONFIG}" --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"]