diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-11-07 20:01:27 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-11-07 20:01:27 -0600 |
| commit | ae2a3e8a72117666cff0c8c181ae02708ea620ca (patch) | |
| tree | 8ddf8a883efa26444703a40d3e9ac21529629ab3 | |
| parent | 61d2a0e2c1efe74e8e14ea867b30b3b948b3cd94 (diff) | |
| download | slskd-ae2a3e8a72117666cff0c8c181ae02708ea620ca.tar.gz | |
tweak dockerfile
| -rw-r--r-- | Dockerfile | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -1,3 +1,4 @@ +# build static web content FROM node:lts-alpine3.13 AS web ARG VERSION=0.0.1.65534-local @@ -8,6 +9,7 @@ COPY src/web src/web/. RUN sh ./bin/build --web-only --version $VERSION +# build, test, and publish application binaries # note: this needs to be pinned to an amd64 image in order to publish armv7 binaries # https://github.com/dotnet/dotnet-docker/issues/1537#issuecomment-615269150 FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim-amd64 AS publish @@ -27,8 +29,7 @@ RUN bash ./bin/build --dotnet-only --version $VERSION RUN bash ./bin/publish --no-prebuild --platform $TARGETPLATFORM --version $VERSION --output ../../dist/${TARGETPLATFORM} -# - +# application FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-buster-slim AS slskd ARG TARGETPLATFORM ARG TAG=0.0.1 @@ -37,7 +38,7 @@ ARG REVISION=0 ARG BUILD_DATE LABEL org.opencontainers.image.title=slskd \ - org.opencontainers.image.description="a modern client-server application for the Soulseek file sharing network" \ + org.opencontainers.image.description="A modern client-server application for the Soulseek file sharing network" \ org.opencontainers.image.authors="slskd Team" \ org.opencontainers.image.vendor="slskd Team" \ org.opencontainers.image.licenses=AGPL-3.0 \ @@ -55,20 +56,18 @@ RUN apt-get update && apt-get install -y \ WORKDIR /slskd COPY --from=publish /slskd/dist/${TARGETPLATFORM} . -RUN bash -c 'mkdir -p /var/slskd/{incomplete,downloads,shared} \ - && chmod -R 777 /var/slskd' - ENV DOTNET_BUNDLE_EXTRACT_BASE_DIR=/var/tmp/.net \ SLSKD_HTTP_PORT=5000 \ - SLSKD_APP_DIR=/var/slskd \ - SLSKD_INCOMPLETE_DIR=/var/slskd/incomplete \ - SLSKD_DOWNLOADS_DIR=/var/slskd/downloads \ - SLSKD_SHARED_DIR=/var/slskd/shared \ + SLSKD_APP_DIR=/app \ SLSKD_DOCKER_TAG=$TAG \ SLSKD_DOCKER_VERSION=$VERSION \ SLSKD_DOCKER_REVISON=$REVISION \ SLSKD_DOCKER_BUILD_DATE=$BUILD_DATE +EXPOSE 5000 + +VOLUME /app + HEALTHCHECK --interval=60s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O - http://localhost:5000/health ENTRYPOINT ["./slskd"]
\ No newline at end of file |
