Skip to content

Commit

Permalink
Merge pull request #1 from opendoor-labs/dh/bump-docker
Browse files Browse the repository at this point in the history
Bump docker version to fix tests in newer debian versions
  • Loading branch information
dan-hipschman committed Jun 26, 2024
2 parents 6491e2c + 406277d commit 348734d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Inspired by https://github.com/mumoshu/dcind
FROM alpine:3.10
LABEL maintainer="Dmitry Matrosov <amidos@amidos.me>"
FROM alpine:3.20.1

ENV DOCKER_VERSION=19.03.12 \
DOCKER_COMPOSE_VERSION=1.25.0
ENV DOCKER_VERSION=25.0.3 \
DOCKER_COMPOSE_VERSION=2.28.1

# Install Docker and Docker Compose
RUN apk --no-cache add bash curl util-linux device-mapper py3-pip python3-dev libffi-dev openssl-dev gcc libc-dev make iptables && \
curl https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
# Install Docker
RUN apk --no-cache add bash curl util-linux device-mapper py3-pip python3-dev libffi-dev openssl-dev gcc libc-dev make iptables
RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
mv /docker/* /bin/ && \
chmod +x /bin/docker* && \
pip3 install --upgrade pip && \
pip3 install docker-compose==${DOCKER_COMPOSE_VERSION} && \
rm -rf /root/.cache
chmod +x /bin/docker*
# Install Docker Compose
RUN mkdir -p ~/.docker/cli-plugins && \
curl -SL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && \
chmod +x ~/.docker/cli-plugins/docker-compose && \
echo -e '#!/bin/bash\nexec docker compose "$@"' > /usr/bin/docker-compose && \
chmod +x /usr/bin/docker-compose

# Include functions to start/stop docker daemon
COPY docker-lib.sh /docker-lib.sh
Expand Down
6 changes: 3 additions & 3 deletions buildAndPushDockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# we also need dcind to keep parity with Concourse
export PUSH_FLAG="--push"
export BUILD_FLAG="buildx build --platform linux/amd64"
export TAG=2.0.0
export IMAGE=opendoor/dcind-ubuntu
export TAG=docker-25.0.3
export IMAGE=opendoor/dcind
if [ "$#" -gt 0 ]
then
PUSH_FLAG=""
BUILD_FLAG="build"
echo This is a local build for your Mac
fi
# docker login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD
docker $BUILD_FLAG -t $IMAGE:$TAG . $PUSH_FLAG -f Dockerfile.ubuntu
docker $BUILD_FLAG -t $IMAGE:$TAG . $PUSH_FLAG -f Dockerfile
echo Built $IMAGE:$TAG
6 changes: 5 additions & 1 deletion docker-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

LOG_FILE=${LOG_FILE:-/tmp/docker.log}
SKIP_PRIVILEGED=${SKIP_PRIVILEGED:-false}
STARTUP_TIMEOUT=${STARTUP_TIMEOUT:-20}
STARTUP_TIMEOUT=${STARTUP_TIMEOUT:-60}
DOCKER_DATA_ROOT=${DOCKER_DATA_ROOT:-/scratch/docker}

sanitize_cgroups() {
Expand Down Expand Up @@ -106,6 +106,10 @@ start_docker() {

if ! timeout ${STARTUP_TIMEOUT} bash -ce 'while true; do try_start && break; done'; then
echo Docker failed to start within ${STARTUP_TIMEOUT} seconds.
echo "Logs"
echo "------------------------------------------------------------------"
cat $LOG_FILE
echo "------------------------------------------------------------------"
return 1
fi
else
Expand Down

0 comments on commit 348734d

Please sign in to comment.