Fixed docker build issues. Updated to latest linuxserver.io ubunutu image. Switched over to s6v3 for running service

This commit is contained in:
Shawn Anderson 2023-03-15 07:51:29 -04:00
parent 6d65de6f5f
commit c4ff8acbc0
13 changed files with 47 additions and 7 deletions

View file

@ -37,4 +37,4 @@ server/**/.vs
server/RdtClient.Web/wwwroot/
build/
publish/
publish/data

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ publish/
node_modules/
RealDebridClient.zip
server/RdtClient.Web/appsettings.Development.json
data

View file

@ -45,7 +45,7 @@ RUN \
fi
# Stage 3 - Build runtime image
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
ARG BUILDPLATFORM
@ -68,7 +68,7 @@ RUN \
apt-get update -y -qq && \
echo "**** Install pre-reqs ****" && \
apt-get install -y -qq wget dos2unix && \
apt-get install -y libc6 libgcc1 libgssapi-krb5-2 libssl1.1 libstdc++6 zlib1g libicu66 && \
apt-get install -y libc6 libgcc1 libgssapi-krb5-2 libssl1.1 libstdc++6 zlib1g libicu60 && \
echo "**** Installing dotnet ****" && \
wget -q https://dot.net/v1/dotnet-install.sh && \
chmod +x ./dotnet-install.sh && \

29
docker-build-dev.ps1 Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env pwsh
param(
[string]$TempPath="c:/Temp/RtdClient",
[switch]$AutoAttach,
[switch]$IgnoreBuildCache,
[string]$BuildProgress="auto"
)
[string] $downloadPath = Join-Path -Path $TempPath -ChildPath "downloads"
[string] $dbPath = Join-Path -Path $TempPath -ChildPath "db"
Write-Host "Stopping Container (if already running)"
docker stop rdtclientdev
Write-Host "removing Container (if exists)"
docker rm rdtclientdev
Write-Host "Building Container"
$dockerArgs = @( "build", "--force-rm", "--tag", "rdtclientdev", "--progress=$BuildProgress", "." )
if ($IgnoreBuildCache.IsPresent) { $dockerArgs += @("--no-cace" ) }
& docker $dockerArgs
Write-Host "Starting Container"
docker run --cap-add=NET_ADMIN -d -v $downloadPath -v $dbPath --log-driver json-file --log-opt max-size=10m -p 6500:6500 --name rdtclientdev rdtclientdev
if ($AutoAttach.IsPresent) {
docker exec -it rdtclientdev /bin/bash
}

View file

@ -1,11 +1,18 @@
version: '3.3'
services:
rdtclient:
image: rogerfar/rdtclient
volumes:
- ./data/downloads:/data/downloads
- ./data/db:/data/db
container_name: rdtclient
build:
context: .
dockerfile: Dockerfile
environment:
- PUID=1001
- PGID=1001
volumes:
- ${PWD}/data/downloads:/data/downloads
- ${PWD}/data/db:/data/db
restart: always
logging:
driver: json-file

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
etc/s6-overlay/s6-rc.d/init-rdt-client/run

View file

@ -0,0 +1 @@
longrun