You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- if [ -z ${COMPOSE_TAG+x} ]; then COMPOSE_TAG=$(curl -sX GET "https://api.github.com/repos/linuxserver/docker-docker-compose/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]'); fi
30
+
- if [ -z ${COMPOSE_ALPINE_TAG+x} ]; then COMPOSE_ALPINE_TAG=$(curl -sX GET "https://api.github.com/repos/linuxserver/docker-docker-compose/releases" | jq -r 'first(.[] | select(.prerelease==true)) | .tag_name'); fi
31
+
- COMPOSE_VERSION=$(echo "$COMPOSE_TAG" | sed 's|-ls.*||g')
32
+
- COMPOSE_ALPINE_VERSION="$(echo ${COMPOSE_ALPINE_TAG} | sed 's|-ls.*||g' | sed 's|alpine-||g')"
33
+
- if [ "$COMPOSE_VERSION" != "$COMPOSE_ALPINE_VERSION" ]; then echo "ubuntu and alpine versions are different; exiting!" && travis_terminate 1; else echo "ubuntu and alpine versions are the same, continuing with build"; fi
This mod adds rsync to openssh-server, to be installed/updated during container start.
3
+
This mod adds `docker` and `docker-compose` binaries to any linuxserver image.
4
4
5
-
In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-rsync`
5
+
**IMPORTANT NOTE**: For docker access inside a container, a volume mapping needs to be added for `/var/run/docker.sock:/var/run/docker.sock` in the container's docker run/create/compose. If you'd like to connect to a remote docker service instead, you don't have to map the docker sock; you can either set an env var for `DOCKER_HOST=remoteaddress` or use the docker cli option `-H`.
6
6
7
-
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-mod2`
7
+
In the container's docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:universal-docker` to enable.
8
8
9
-
# Mod creation instructions
10
-
11
-
* Fork the repo, create a new branch based on the branch `template`.
12
-
* Edit the `Dockerfile` for the mod. `Dockerfile.complex` is only an example and included for reference; it should be deleted when done.
13
-
* Inspect the `root` folder contents. Edit, add and remove as necessary.
14
-
* Edit this readme with pertinent info, delete these instructions.
15
-
* Finally edit the `travis.yml`. Customize the build branch, and the vars for `BASEIMAGE` and `MODNAME`.
16
-
* Ask the team to create a new branch named `<baseimagename>-<modname>`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch.
17
-
* Submit PR against the branch created by the team.
9
+
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:universal-docker|linuxserver/mods:universal-mod2`
echo "**** docker and docker-compose already installed, skipping ****"
18
+
fi
19
+
20
+
if [ -S /var/run/docker.sock ]; then
21
+
DOCKER_GID=$(stat -c '%g' "/var/run/docker.sock")
22
+
if id -G abc | grep -qw "$DOCKER_GID"; then
23
+
exit 0
24
+
else
25
+
DOCKER_NAME=$(getent group "${DOCKER_GID}" | awk -F: '{print $1}')
26
+
if [ -z "${DOCKER_NAME}" ]; then
27
+
DOCKER_NAME="dockergroup"
28
+
groupadd -g "${DOCKER_GID}" "${DOCKER_NAME}"
29
+
fi
30
+
usermod -aG "${DOCKER_NAME}" abc
31
+
fi
32
+
elif [ -n "$DOCKER_HOST" ]; then
33
+
echo "**** /var/run/docker.sock is not mapped, therefore, docker client will only work with a remote docker service ****"
34
+
else
35
+
echo "**** Please map /var/run/docker.sock for access to docker service on host. Alternatively you can manually define a remote host address with the docker cli option -H ****"
0 commit comments