aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Buhl <onedr0p@users.noreply.github.com>2023-09-06 16:27:27 -0400
committerGitHub <noreply@github.com>2023-09-06 16:27:27 -0400
commite8e0e8474d82d1b0c0acd3ed0d0b0a61c04bd532 (patch)
tree9d10eaf42b5746843ca47f3e6ca958f47ae8f96d
parent95fe2dc2689e6d63bde85eb23d8724ff079ad395 (diff)
downloadslskd-e8e0e8474d82d1b0c0acd3ed0d0b0a61c04bd532.tar.gz
fix: use alpine 3.18 and debian bookworm in docker build
-rw-r--r--Dockerfile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 7ce2500b..f634d1b5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# build static web content
-FROM node:lts-alpine3.16 AS web
+FROM node:lts-alpine3.18 AS web
ARG VERSION=0.0.1.65534-local
WORKDIR /slskd
@@ -12,7 +12,7 @@ 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:7.0-bullseye-slim-amd64 AS publish
+FROM mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim-amd64 AS publish
ARG TARGETPLATFORM
ARG VERSION=0.0.1.65534-local
@@ -31,17 +31,22 @@ 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:7.0-bullseye-slim AS slskd
+FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-bookworm-slim AS slskd
ARG TARGETPLATFORM
ARG TAG=0.0.1
ARG VERSION=0.0.1.65534-local
ARG REVISION=0
ARG BUILD_DATE
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install --no-installs-recommends -y \
wget \
tini \
- && rm -rf /var/lib/apt/lists/*
+ && \
+ rm -rf \
+ /tmp/* \
+ /var/lib/apt/lists/* \
+ /var/cache/apt/* \
+ /var/tmp/*
RUN bash -c 'mkdir -p /app/{incomplete,downloads} \
&& chmod -R 777 /app \
@@ -81,4 +86,4 @@ LABEL org.opencontainers.image.title=slskd \
WORKDIR /slskd
COPY --from=publish /slskd/dist/${TARGETPLATFORM} .
-ENTRYPOINT ["/usr/bin/tini", "--", "./slskd"] \ No newline at end of file
+ENTRYPOINT ["/usr/bin/tini", "--", "./slskd"]