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/
|
server/RdtClient.Web/wwwroot/
|
||||||
|
|
||||||
build/
|
build/
|
||||||
publish/
|
publish/data
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ publish/
|
||||||
node_modules/
|
node_modules/
|
||||||
RealDebridClient.zip
|
RealDebridClient.zip
|
||||||
server/RdtClient.Web/appsettings.Development.json
|
server/RdtClient.Web/appsettings.Development.json
|
||||||
|
data
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ RUN \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Stage 3 - Build runtime image
|
# Stage 3 - Build runtime image
|
||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
|
|
@ -68,7 +68,7 @@ RUN \
|
||||||
apt-get update -y -qq && \
|
apt-get update -y -qq && \
|
||||||
echo "**** Install pre-reqs ****" && \
|
echo "**** Install pre-reqs ****" && \
|
||||||
apt-get install -y -qq wget dos2unix && \
|
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 ****" && \
|
echo "**** Installing dotnet ****" && \
|
||||||
wget -q https://dot.net/v1/dotnet-install.sh && \
|
wget -q https://dot.net/v1/dotnet-install.sh && \
|
||||||
chmod +x ./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'
|
version: '3.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
rdtclient:
|
rdtclient:
|
||||||
image: rogerfar/rdtclient
|
image: rogerfar/rdtclient
|
||||||
volumes:
|
|
||||||
- ./data/downloads:/data/downloads
|
|
||||||
- ./data/db:/data/db
|
|
||||||
container_name: rdtclient
|
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
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
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