You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. FROM microsoft/dotnet:2.1-sdk AS builder
  2. ARG WEBAPI_PROJECT=WebApi
  3. ARG BUILD_CONFIG=Release
  4. ARG CONFIG_DIR=/etc/default/config-files/
  5. COPY ./SiteStatus/ /tmp/backend/
  6. RUN echo "Building ${WEBAPI_PROJECT} in ${BUILD_CONFIG} configuration" && \
  7. mkdir "${CONFIG_DIR}" &&\
  8. cd /tmp/backend/ && \
  9. dotnet restore && \
  10. mkdir /var/www && \
  11. cd /tmp/backend/${WEBAPI_PROJECT} && \
  12. dotnet publish --configuration "${BUILD_CONFIG}" --output /var/www && \
  13. cp /tmp/backend/${WEBAPI_PROJECT}/appsettings.* "${CONFIG_DIR}" && \
  14. ln -s /var/www/${WEBAPI_PROJECT}.dll /var/www/__RUN_ME.DLL &&\
  15. ls /var/www /tmp/backend/SiteStatus/bin/Release/netcoreapp2.1
  16. FROM microsoft/dotnet:2.1-aspnetcore-runtime
  17. ARG CONFIG_DIR=/etc/default/config-files/
  18. RUN rm -rf /var/log/* && \
  19. mkdir "${CONFIG_DIR}"
  20. COPY ./vars-vars /etc/vars-vars
  21. COPY ./vars-files /etc/vars-files
  22. COPY ./run.sh /run.sh
  23. COPY --from=builder "${CONFIG_DIR}" "${CONFIG_DIR}"
  24. COPY --from=builder /var/www /var/www
  25. EXPOSE 80
  26. VOLUME ["/data/storage"]
  27. CMD ["/run.sh"]