-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from PlusMinus0/dev
v3
- Loading branch information
Showing
12 changed files
with
164 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*\~ | ||
.\#* | ||
\#*\# | ||
.config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
sudo: required | ||
language: generic | ||
|
||
services: | ||
- docker | ||
|
||
jobs: | ||
include: | ||
- stage: "Build and Test" | ||
before_script: | ||
- curl -fsSL https://goss.rocks/install | sudo sh | ||
script: | ||
- ./build-n-test.sh | ||
|
||
notifications: | ||
webhooks: | ||
urls: | ||
- https://registry.hub.docker.com/u/plusminus/jdownloader2-headless/trigger/e50efaab-36ed-4900-b08d-3cf8944ca9cd/ | ||
on_success: always | ||
on_failure: never | ||
on_start: never | ||
on_cancel: never | ||
on_error: never |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM openjdk:8-jre-alpine | ||
|
||
MAINTAINER PlusMinus <[email protected]> | ||
|
||
# Create directory, and start JD2 for the initial update and creation of config files. | ||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache --quiet tini su-exec shadow ffmpeg && \ | ||
mkdir -p /opt/JDownloader/libs && \ | ||
wget -O /opt/JDownloader/JDownloader.jar --user-agent="https://hub.docker.com/r/plusminus/jdownloader2-headless/" http://installer.jdownloader.org/JDownloader.jar && \ | ||
java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar | ||
|
||
# Beta sevenzipbindings and entrypoint | ||
COPY common/* /opt/JDownloader/ | ||
RUN chmod +x /opt/JDownloader/entrypoint.sh | ||
|
||
|
||
ENTRYPOINT ["tini", "-g", "--", "/opt/JDownloader/entrypoint.sh"] | ||
# Run this when the container is started | ||
CMD ["java", "-Djava.awt.headless=true", "-jar", "/opt/JDownloader/JDownloader.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
images=('alpine' 'debian') | ||
|
||
if [ "$(docker version --format '{{.Server.Experimental}}')" = 'true' ]; then | ||
export DOCKER_BUILDKIT=1 | ||
fi | ||
|
||
|
||
for image in "${images[@]}"; do | ||
tag="jd2dev:${image}" | ||
|
||
echo "Building $tag" | ||
docker build -t $tag -f $image.Dockerfile . | ||
|
||
echo "Testing image" | ||
dgoss run $tag | ||
done | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# Set defaults for uid and gid to not be root | ||
if [ -n $GID ]; then GID=100; fi | ||
if [ -n $UID ]; then UID=1000; fi | ||
|
||
if [ "$GID" -ne "0" ]; then | ||
GROUP=jdownloader | ||
groupadd -g $GID $GROUP | ||
else | ||
GROUP=root | ||
fi | ||
|
||
if [ "$UID" -ne "0" ]; then | ||
USER=jdownloader | ||
|
||
# Create user without home (-M) and remove login shell | ||
useradd -M -s /bin/false -g $GID -u $UID $USER | ||
else | ||
USER=root | ||
usermod -ag $GID | ||
fi | ||
|
||
chown -R $UID:$GID /opt/JDownloader | ||
|
||
# Sometimes this gets deleted. Just copy it every time. | ||
cp /opt/JDownloader/sevenzip* /opt/JDownloader/libs/ | ||
|
||
su-exec ${UID}:${GID} "$@" | ||
|
||
# Keep container alive when jd2 restarts | ||
while sleep 3600; do :; done |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM openjdk:11-jre-slim-sid | ||
|
||
MAINTAINER PlusMinus <[email protected]> | ||
|
||
# Create directory, and start JD2 for the initial update and creation of config files. | ||
RUN apt-get update && apt-get dist-upgrade -yqq && \ | ||
apt-get install -yqq tini ffmpeg wget make gcc && \ | ||
mkdir -p /opt/JDownloader/libs && \ | ||
wget -O /opt/JDownloader/JDownloader.jar --user-agent="https://hub.docker.com/r/plusminus/jdownloader2-headless/" http://installer.jdownloader.org/JDownloader.jar && \ | ||
java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar && \ | ||
mkdir -p /tmp/ && \ | ||
wget -O /tmp/su-exec.tar.gz https://github.com/ncopa/su-exec/archive/v0.2.tar.gz && \ | ||
cd /tmp/ && tar -xf su-exec.tar.gz && cd su-exec-0.2 && make && cp su-exec /usr/bin &&\ | ||
apt-get purge -yqq wget make gcc && apt-get autoremove -yqq && cd / && rm -rf tmp | ||
|
||
# Beta sevenzipbindings and entrypoint | ||
COPY common/* /opt/JDownloader/ | ||
RUN chmod +x /opt/JDownloader/entrypoint.sh | ||
|
||
|
||
ENTRYPOINT ["tini", "-g", "--", "/opt/JDownloader/entrypoint.sh"] | ||
# Run this when the container is started | ||
CMD ["java", "-Djava.awt.headless=true", "-jar", "/opt/JDownloader/JDownloader.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
file: | ||
/opt/JDownloader/JDownloader.jar: | ||
exists: true | ||
mode: "0644" | ||
filetype: file | ||
contains: [] | ||
/opt/JDownloader/sevenzipjbinding1509.jar: | ||
exists: true | ||
mode: "0664" | ||
filetype: file | ||
contains: [] | ||
/opt/JDownloader/sevenzipjbinding1509Linux.jar: | ||
exists: true | ||
mode: "0664" | ||
filetype: file | ||
contains: [] | ||
package: | ||
ffmpeg: | ||
installed: true | ||
user: | ||
jdownloader: | ||
exists: true | ||
uid: 1000 | ||
gid: 100 | ||
groups: | ||
- users | ||
home: [] | ||
shell: /bin/false |
This file was deleted.
Oops, something went wrong.