Skip to content

Commit

Permalink
Always use latest, non-prelease version of docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
olljanat committed Aug 20, 2023
1 parent fa8c51e commit a35c633
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 22 deletions.
4 changes: 2 additions & 2 deletions d/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
docker-compose:
image: ${REGISTRY_DOMAIN}/burmilla/os-dockercompose:2.20.2
image: ${REGISTRY_DOMAIN}/burmilla/os-dockercompose:latest
labels:
io.rancher.os.scope: system
io.rancher.os.after: console
io.docker.compose.rebuild: always
net: none
net: host
privileged: true
volumes_from:
- all-volumes
7 changes: 4 additions & 3 deletions images/20-dockercompose/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM alpine
COPY compose /compose
ENTRYPOINT /bin/sh /compose/copy.sh
FROM bash
RUN apk --no-cache add jq
COPY /download.sh /
ENTRYPOINT /usr/local/bin/bash /download.sh
2 changes: 0 additions & 2 deletions images/20-dockercompose/copy.sh

This file was deleted.

7 changes: 7 additions & 0 deletions images/20-dockercompose/download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

VERSION=$(jq -r 'map(select(.prerelease == false)) | first | .tag_name' <<< $(wget -q -O - https://api.github.com/repos/docker/compose/releases))
DOCKERARCH=$(uname -m)
COMPOSE_URL="https://github.com/docker/compose/releases/download/v${VERSION}/docker-compose-linux-${DOCKERARCH}"
wget -q -O /var/lib/rancher/compose/docker-compose $COMPOSE_URL
chmod 0755 /var/lib/rancher/compose/docker-compose
15 changes: 0 additions & 15 deletions images/20-dockercompose/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
#!/bin/bash
set -ex

cd $(dirname $0)

VERSION=$1
ARCH=$2
if [ "$ARCH" == "amd64" ]; then
DOCKERARCH="x86_64"
COMPOSE_URL="https://github.com/docker/compose/releases/download/v${VERSION}/docker-compose-linux-${DOCKERARCH}"
fi

mkdir -p compose
curl -sL -o compose/docker-compose ${COMPOSE_URL}
chmod 0755 compose/docker-compose
cp copy.sh compose/

0 comments on commit a35c633

Please sign in to comment.