FROM microsoft/dotnet:latest RUN rm -rf /var/log/* COPY ./backend/ /tmp/backend/ ENV WEBAPI_PROJECT WebTest ENV BUILD_CONFIG Release RUN cd /tmp/backend && \ dotnet restore && \ find . -name project.json | xargs dotnet build -c ${BUILD_CONFIG} && \ 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 COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./run.sh /run.sh EXPOSE 80 CMD ["/run.sh"]