mirror of
https://github.com/luzifer-docker/docker-compose.git
synced 2024-12-20 01:31:17 +00:00
Switch to binary build from Alpine repo
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fc30ce3f95
commit
7be112f808
4 changed files with 3 additions and 99 deletions
16
Dockerfile
16
Dockerfile
|
@ -1,18 +1,8 @@
|
|||
FROM python:3-alpine
|
||||
|
||||
COPY container-build /opt/setup/container-build
|
||||
COPY requirements.txt /opt/setup/requirements.txt
|
||||
FROM alpine
|
||||
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add \
|
||||
bash \
|
||||
cargo \
|
||||
rust \
|
||||
&& /opt/setup/container-build \
|
||||
&& apk --no-cache del \
|
||||
bash \
|
||||
cargo \
|
||||
rust
|
||||
docker-cli-compose
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-compose"]
|
||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
||||
CMD ["help"]
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
build_requirements=(
|
||||
build-base
|
||||
libffi-dev
|
||||
openssl-dev
|
||||
)
|
||||
|
||||
run_requirements=(
|
||||
libffi
|
||||
openssl
|
||||
)
|
||||
|
||||
apk --no-cache add \
|
||||
"${build_requirements[@]}" \
|
||||
"${run_requirements[@]}"
|
||||
|
||||
pip install --no-cache-dir -r /opt/setup/requirements.txt
|
||||
|
||||
apk --no-cache del \
|
||||
"${build_requirements[@]}"
|
|
@ -1 +0,0 @@
|
|||
docker-compose==1.29.2
|
|
@ -1,63 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
HOST_OS=$(uname -s)
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Switch back to master"
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
|
||||
### ---- ###
|
||||
|
||||
if ! [ -e jq ]; then
|
||||
echo "Loading local copy of jq-1.5"
|
||||
|
||||
case ${HOST_OS} in
|
||||
Linux)
|
||||
curl -sSLo ./jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
|
||||
;;
|
||||
Darwin)
|
||||
curl -sSLo ./jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64
|
||||
;;
|
||||
*)
|
||||
echo "/!\\ Unable to download jq for ${HOST_OS}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
chmod +x jq
|
||||
fi
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Fetching latest version number of docker-compose"
|
||||
|
||||
COMPOSE_VERSION=$(curl -sSL https://pypi.python.org/pypi/docker-compose/json | ./jq -r .info.version)
|
||||
[[ -n $COMPOSE_VERSION ]] || {
|
||||
echo "Empty version found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (git tag -l ${COMPOSE_VERSION} | grep -q ${COMPOSE_VERSION}); then
|
||||
echo "/!\\ Already got a tag for version ${COMPOSE_VERSION}, stopping now"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Writing requirements.txt"
|
||||
echo "docker-compose==${COMPOSE_VERSION}" >requirements.txt
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Testing build..."
|
||||
docker build .
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Updating repository..."
|
||||
git add requirements.txt
|
||||
git -c user.name='Travis Automated Update' -c user.email='travis@luzifer.io' \
|
||||
commit -m "docker-compose ${COMPOSE_VERSION}"
|
||||
git tag ${COMPOSE_VERSION}
|
||||
|
||||
git push -q https://${GH_USER}:${GH_TOKEN}@github.com/luzifer-docker/docker-compose master --tags
|
Loading…
Reference in a new issue