Fixed docker build issues. Updated to latest linuxserver.io ubunutu image. Switched over to s6v3 for running service
This commit is contained in:
parent
6d65de6f5f
commit
c4ff8acbc0
13 changed files with 47 additions and 7 deletions
|
|
@ -37,4 +37,4 @@ server/**/.vs
|
|||
server/RdtClient.Web/wwwroot/
|
||||
|
||||
build/
|
||||
publish/
|
||||
publish/data
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ publish/
|
|||
node_modules/
|
||||
RealDebridClient.zip
|
||||
server/RdtClient.Web/appsettings.Development.json
|
||||
data
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ RUN \
|
|||
if [ "$TARGETPLATFORM" = "linux/arm/v7" ] ; then \
|
||||
echo "**** Building $TARGETPLATFORM arm v7 version" && \
|
||||
dotnet restore -r linux-arm RdtClient.sln && dotnet publish -r linux-arm -c Release -o out ; \
|
||||
elif [ "$TARGETPLATFORM" = "linux/arm/v8"] ; then \
|
||||
elif [ "$TARGETPLATFORM" = "linux/arm/v8" ] ; then \
|
||||
echo "**** Building $TARGETPLATFORM arm v8 version" && \
|
||||
dotnet restore -r linux-arm64 RdtClient.sln && dotnet publish -r linux-arm64 -c Release -o out ; \
|
||||
else \
|
||||
|
|
@ -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
29
docker-build-dev.ps1
Executable 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
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
1
root/etc/s6-overlay/s6-rc.d/init-rdt-client/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-rdt-client/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-rdt-client/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-rdt-client/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
etc/s6-overlay/s6-rc.d/init-rdt-client/run
|
||||
0
root/etc/services.d/rdtclient/run → root/etc/s6-overlay/s6-rc.d/svc-rdt-client/run
Executable file → Normal file
0
root/etc/services.d/rdtclient/run → root/etc/s6-overlay/s6-rc.d/svc-rdt-client/run
Executable file → Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-rdt-client/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-rdt-client/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
Loading…
Reference in a new issue