Skip to content

Commit

Permalink
Merge pull request #6835 from docker/bump-1.25.0-rc2
Browse files Browse the repository at this point in the history
Bump 1.25.0-rc2
  • Loading branch information
ulyssessouza committed Aug 7, 2019
2 parents 85d9409 + 661ac20 commit 2c668e2
Show file tree
Hide file tree
Showing 126 changed files with 1,559 additions and 659 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
command: sudo pip install --upgrade tox==2.1.1 virtualenv==16.2.0
- run:
name: unit tests
command: tox -e py27,py36,py37 -- tests/unit
command: tox -e py27,py37 -- tests/unit

build-osx-binary:
macos:
Expand Down
70 changes: 67 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,78 @@
Change log
==========

1.24.1 (2019-06-24)
1.25.0-rc2 (2019-08-06)
-------------------

### Features

- Add tag `docker-compose:latest`

- Add `docker-compose:<version>-alpine` image/tag

- Add `docker-compose:<version>-debian` image/tag

- Bumped `docker-py` 4.0.1

- Supports `requests` up to 2.22.0 version

- Drops empty tag on `build:cache_from`

- `Dockerfile` now generates `libmusl` binaries for alpine

- Only pull images that can't be built

- Attribute `scale` can now accept `0` as a value

- Added `--quiet` build flag

- Added `--no-interpolate` to `docker-compose config`

- Bump OpenSSL for macOS build (`1.1.0j` to `1.1.1a`)

- Added `--no-rm` to `build` command

- Added support for `credential_spec`

- Resolve digests without pulling image

- Upgrade `pyyaml` to `4.2b1`

- Lowered severity to `warning` if `down` tries to remove nonexisting image

- Use improved API fields for project events when possible

- Update `setup.py` for modern `pypi/setuptools` and remove `pandoc` dependencies

- Removed `Dockerfile.armhf` which is no longer needed

### Bugfixes

- Fixed acceptance tests
- Fixed stdin_open

- Fixed `--remove-orphans` when used with `up --no-start`

- Fixed `docker-compose ps --all`

- Fixed `depends_on` dependency recreation behavior

- Fixed bash completion for `build --memory`

- Fixed misleading warning concerning env vars when performing an `exec` command

- Fixed failure check in parallel_execute_watch

- Fixed race condition after pulling image

- Fixed error on duplicate mount points.

- Fixed merge on networks section

- Always connect Compose container to `stdin`

- Fixed the presentation of failed services on 'docker-compose start' when containers are not available

1.24.0 (2019-03-22)
1.24.0 (2019-03-28)
-------------------

### Features
Expand Down
87 changes: 61 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,71 @@
FROM docker:18.06.1 as docker
FROM python:3.6
ARG DOCKER_VERSION=18.09.7
ARG PYTHON_VERSION=3.7.4
ARG BUILD_ALPINE_VERSION=3.10
ARG BUILD_DEBIAN_VERSION=slim-stretch
ARG RUNTIME_ALPINE_VERSION=3.10.0
ARG RUNTIME_DEBIAN_VERSION=stretch-20190708-slim

RUN set -ex; \
apt-get update -qq; \
apt-get install -y \
locales \
python-dev \
git
ARG BUILD_PLATFORM=alpine

COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
FROM docker:${DOCKER_VERSION} AS docker-cli

# Python3 requires a valid locale
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
FROM python:${PYTHON_VERSION}-alpine${BUILD_ALPINE_VERSION} AS build-alpine
RUN apk add --no-cache \
bash \
build-base \
ca-certificates \
curl \
gcc \
git \
libc-dev \
libffi-dev \
libgcc \
make \
musl-dev \
openssl \
openssl-dev \
python2 \
python2-dev \
zlib-dev
ENV BUILD_BOOTLOADER=1

RUN useradd -d /home/user -m -s /bin/bash user
WORKDIR /code/
FROM python:${PYTHON_VERSION}-${BUILD_DEBIAN_VERSION} AS build-debian
RUN apt-get update && apt-get install -y \
curl \
gcc \
git \
libc-dev \
libgcc-6-dev \
make \
openssl \
python2.7-dev

FROM build-${BUILD_PLATFORM} AS build
COPY docker-compose-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["sh", "/usr/local/bin/docker-compose-entrypoint.sh"]
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
WORKDIR /code/
# FIXME(chris-crone): virtualenv 16.3.0 breaks build, force 16.2.0 until fixed
RUN pip install virtualenv==16.2.0
RUN pip install tox==2.1.1
RUN pip install tox==2.9.1

ADD requirements.txt /code/
ADD requirements-dev.txt /code/
ADD .pre-commit-config.yaml /code/
ADD setup.py /code/
ADD tox.ini /code/
ADD compose /code/compose/
ADD README.md /code/
COPY requirements.txt .
COPY requirements-dev.txt .
COPY .pre-commit-config.yaml .
COPY tox.ini .
COPY setup.py .
COPY README.md .
COPY compose compose/
RUN tox --notest
COPY . .
ARG GIT_COMMIT=unknown
ENV DOCKER_COMPOSE_GITSHA=$GIT_COMMIT
RUN script/build/linux-entrypoint

ADD . /code/
RUN chown -R user /code/

ENTRYPOINT ["/code/.tox/py36/bin/docker-compose"]
FROM alpine:${RUNTIME_ALPINE_VERSION} AS runtime-alpine
FROM debian:${RUNTIME_DEBIAN_VERSION} AS runtime-debian
FROM runtime-${BUILD_PLATFORM} AS runtime
COPY docker-compose-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["sh", "/usr/local/bin/docker-compose-entrypoint.sh"]
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=build /usr/local/bin/docker-compose /usr/local/bin/docker-compose
39 changes: 0 additions & 39 deletions Dockerfile.armhf

This file was deleted.

19 changes: 0 additions & 19 deletions Dockerfile.run

This file was deleted.

55 changes: 33 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
#!groovy

def image

def buildImage = { ->
def buildImage = { String baseImage ->
def image
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("build image") {
stage("build image for \"${baseImage}\"") {
checkout(scm)
def imageName = "dockerbuildbot/compose:${gitCommit()}"
def imageName = "dockerbuildbot/compose:${baseImage}-${gitCommit()}"
image = docker.image(imageName)
try {
image.pull()
} catch (Exception exc) {
image = docker.build(imageName, ".")
image.push()
sh """GIT_COMMIT=\$(script/build/write-git-sha) && \\
docker build -t ${imageName} \\
--target build \\
--build-arg BUILD_PLATFORM="${baseImage}" \\
--build-arg GIT_COMMIT="${GIT_COMMIT}" \\
.\\
"""
sh "docker push ${imageName}"
echo "${imageName}"
return imageName
}
}
}
echo "image.id: ${image.id}"
return image.id
}

def get_versions = { int number ->
def get_versions = { String imageId, int number ->
def docker_versions
wrappedNode(label: "ubuntu && !zfs") {
def result = sh(script: """docker run --rm \\
--entrypoint=/code/.tox/py27/bin/python \\
${image.id} \\
${imageId} \\
/code/script/test/versions.py -n ${number} docker/docker-ce recent
""", returnStdout: true
)
Expand All @@ -35,17 +44,19 @@ def get_versions = { int number ->
def runTests = { Map settings ->
def dockerVersions = settings.get("dockerVersions", null)
def pythonVersions = settings.get("pythonVersions", null)
def baseImage = settings.get("baseImage", null)
def imageName = settings.get("image", null)

if (!pythonVersions) {
throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py27,py36')`")
throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py27,py37')`")
}
if (!dockerVersions) {
throw new Exception("Need Docker versions to test. e.g.: `runTests(dockerVersions: 'all')`")
}

{ ->
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("test python=${pythonVersions} / docker=${dockerVersions}") {
stage("test python=${pythonVersions} / docker=${dockerVersions} / baseImage=${baseImage}") {
checkout(scm)
def storageDriver = sh(script: 'docker info | awk -F \': \' \'$1 == "Storage Driver" { print $2; exit }\'', returnStdout: true).trim()
echo "Using local system's storage driver: ${storageDriver}"
Expand All @@ -55,30 +66,30 @@ def runTests = { Map settings ->
--privileged \\
--volume="\$(pwd)/.git:/code/.git" \\
--volume="/var/run/docker.sock:/var/run/docker.sock" \\
-e "TAG=${image.id}" \\
-e "TAG=${imageName}" \\
-e "STORAGE_DRIVER=${storageDriver}" \\
-e "DOCKER_VERSIONS=${dockerVersions}" \\
-e "BUILD_NUMBER=\$BUILD_TAG" \\
-e "PY_TEST_VERSIONS=${pythonVersions}" \\
--entrypoint="script/test/ci" \\
${image.id} \\
${imageName} \\
--verbose
"""
}
}
}
}

buildImage()

def testMatrix = [failFast: true]
def docker_versions = get_versions(2)

for (int i = 0; i < docker_versions.length; i++) {
def dockerVersion = docker_versions[i]
testMatrix["${dockerVersion}_py27"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py27"])
testMatrix["${dockerVersion}_py36"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py36"])
testMatrix["${dockerVersion}_py37"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py37"])
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py27', 'py37']
baseImages.each { baseImage ->
def imageName = buildImage(baseImage)
get_versions(imageName, 2).each { dockerVersion ->
pythonVersions.each { pyVersion ->
testMatrix["${baseImage}_${dockerVersion}_${pyVersion}"] = runTests([baseImage: baseImage, image: imageName, dockerVersions: dockerVersion, pythonVersions: pyVersion])
}
}
}

parallel(testMatrix)
Loading

0 comments on commit 2c668e2

Please sign in to comment.