Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

Commit 8aeda62

Browse files
committed
Add compose switch
1 parent f27f718 commit 8aeda62

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

build_in_docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/bash
22
[ -z "$COMPOSE_VERSION" ] && COMPOSE_VERSION=2.0.1
3-
docker run --rm --tmpfs /tmp -v $PWD/archive:/mnt/output:rw -e COMPOSE_VERSION=$COMPOSE_VERSION -e OUTPUT_FOLDER="/mnt/output" -v $PWD/source:/mnt/source:ro vbatts/slackware:latest /mnt/source/pkg_build.sh $UI_VERSION_LETTER
3+
[ -z "COMPOSE_SWITCH_VERSION" ] && COMPOSE_SWITCH_VERSION=1.0.2
4+
docker run --rm --tmpfs /tmp -v $PWD/archive:/mnt/output:rw -e COMPOSE_VERSION=$COMPOSE_VERSION -e COMPOSE_SWITCH_VERSION=$COMPOSE_SWITCH_VERSION -e OUTPUT_FOLDER="/mnt/output" -v $PWD/source:/mnt/source:ro vbatts/slackware:latest /mnt/source/pkg_build.sh $UI_VERSION_LETTER

compose.manager.plg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ rm -f $(ls &pluginLOC;/&name;*.txz 2>/dev/null|grep -v '&packageVER;')
4343

4444
<FILE Run="/bin/bash">
4545
<INLINE>
46-
kill -SIGHUP pidof docker
46+
pidof dockerd | xargs kill -SIGHUP
4747
</INLINE>
4848
</FILE>
4949

source/pkg_build.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
#!/bin/bash
22
[ -z "$OUTPUT_FOLDER" ] && echo "Output Folder not set" && exit 1
33
[ -z "$COMPOSE_VERSION" ] && echo "Compose Version not set" && exit 1
4+
[ -z "$COMPOSE_SWITCH_VERSION" ] && echo "Compose Switch Version not set" && exit 1
45
tmpdir=/tmp/tmp.$(( $RANDOM * 19318203981230 + 40 ))
56
version=$(date +"%Y.%m.%d")$1
67

78
# mkdir -p $tmpdir/usr/local/emhttp/plugins/compose.manager
89

910
# cp -RT /mnt/source/docker.compose/ $tmpdir/usr/local/emhttp/plugins/compose.manager/
1011

11-
mkdir -p $tmpdir/usr/local/lib/docker/cli-plugins/
12-
cd $tmpdir/usr/local/lib/docker/cli-plugins/
12+
cd $tmpdir
13+
14+
#Install the docker compose cli plugin
1315
wget --no-check-certificate https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-x86_64
1416
wget --no-check-certificate https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-x86_64.sha256
1517
sha256sum -c docker-compose-linux-x86_64.sha256 2>&1 | grep -q OK || exit 2
1618
rm docker-compose-linux-x86_64.sha256
1719

18-
cd $tmpdir
19-
20+
mkdir -p $tmpdir/usr/local/lib/docker/cli-plugins/
21+
cd $tmpdir/usr/local/lib/docker/cli-plugins/
22+
cp docker-compose-linux-x86_64 docker-compose
2023
chmod -R +x $tmpdir/usr/local/lib/docker/cli-plugins/
2124

25+
rm docker-compose-linux-x86_64
26+
27+
#Install compose switch
28+
wget --no-check-certificate https://github.com/docker/compose-switch/releases/download/v${COMPOSE_SWITCH_VERSION}/docker-compose-linux-amd64
29+
cp docker-compose-linux-amd64 /usr/local/bin/docker-compose
30+
chmod +x /usr/local/bin/docker-compose
31+
rm docker-compose-linux-amd64
32+
2233
makepkg -l y -c y $OUTPUT_FOLDER/compose.manager-package-${version}.txz
2334

2435
cd /

0 commit comments

Comments
 (0)