aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-02 12:49:22 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-02 12:49:22 -0600
commit7b6ba4191c5acdb4d762ec7142adfe9d7943ab95 (patch)
tree305f5f06a62cac9c470d3dcb4856ceab6a0ad6eb /Dockerfile
parentffe371cd5275f0b075ca7a00ec14cd330d0e3ee1 (diff)
downloadslskd-7b6ba4191c5acdb4d762ec7142adfe9d7943ab95.tar.gz
tweak build stuff
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index b910103e..6b621ad3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,18 +1,27 @@
FROM node:lts-alpine3.12 AS web
WORKDIR /web/
COPY src/web .
-RUN npm install
+RUN npm ci
+RUN npm run test-unattended
RUN npm run build
FROM mcr.microsoft.com/dotnet/sdk:5.0 as build
WORKDIR /slskd/
COPY src/slskd .
COPY --from=web web/build wwwroot
-RUN dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained --runtime linux-musl-x64
+RUN dotnet restore
+RUN dotnet build --no-restore --configuration Release
+RUN dotnet test --no-build --verbosity minimal --blame
+
+FROM mcr.microsoft.com/dotnet/sdk:5.0 as publish
+WORKDIR /slskd/
+COPY src/slskd .
+COPY --from=web web/build wwwroot
+RUN dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true -p:CopyOutputSymbolsToPublishDirectory=false --self-contained --runtime linux-musl-x64 --output dist
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine
WORKDIR /slskd/
-COPY --from=build slskd/bin/Release/net5.0/linux-musl-x64/publish .
+COPY --from=publish slskd/dist .
RUN mkdir /var/slsk
RUN mkdir /var/slsk/shared