diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-11-09 21:37:20 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-09 21:37:20 -0600 |
| commit | 7fe7771af831bb6d46629869dc2490d8f14b7cf9 (patch) | |
| tree | 4499b75e43e9a3395a7d02ea75d959a40447ff46 /Dockerfile | |
| parent | 746f40934d56637a1af529285a4054720f22f4a8 (diff) | |
| parent | 86f5e46c2dfe595d8a970cc2f9e49d2520f14b55 (diff) | |
| download | slskd-7fe7771af831bb6d46629869dc2490d8f14b7cf9.tar.gz | |
Merge pull request #245 from slskd/config
Move the default configuration location to the App directory, create a Docker volume for /app
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 21 |
1 files changed, 12 insertions, 9 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 @@ -18,6 +20,7 @@ WORKDIR /slskd COPY LICENSE . COPY bin bin/. +COPY config config/. COPY src/slskd src/slskd/. COPY tests tests/. @@ -27,8 +30,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 +39,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 +57,21 @@ 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' +RUN bash -c 'mkdir -p /app/{incomplete,downloads} \ + && chmod -R 777 /app' 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 |
