diff --git a/CHANGELOG.md b/CHANGELOG.md index ea970a100..4287de493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Change log ========== -1.19.0 (2018-01-31) +1.19.0 (2018-02-07) ------------------- ### Breaking changes diff --git a/Dockerfile.run b/Dockerfile.run index 5d246e9e6..a09e57a09 100644 --- a/Dockerfile.run +++ b/Dockerfile.run @@ -1,13 +1,33 @@ -FROM alpine:3.4 +FROM sgerrand/glibc-builder as glibc +RUN apt-get install -yq bison -ENV GLIBC 2.23-r3 +ENV PKGDIR /pkgdata -RUN apk update && apk add --no-cache openssl ca-certificates && \ - wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \ - wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk && \ - apk add --no-cache glibc-$GLIBC.apk && rm glibc-$GLIBC.apk && \ - ln -s /lib/libz.so.1 /usr/glibc-compat/lib/ && \ - ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib +RUN mkdir -p /usr/glibc-compat/etc && touch /usr/glibc-compat/etc/ld.so.conf +RUN /builder 2.27 /usr/glibc-compat || true +RUN mkdir -p $PKGDIR +RUN tar -xf /glibc-bin-2.27.tar.gz -C $PKGDIR +RUN rm "$PKGDIR"/usr/glibc-compat/etc/rpc && \ + rm -rf "$PKGDIR"/usr/glibc-compat/bin && \ + rm -rf "$PKGDIR"/usr/glibc-compat/sbin && \ + rm -rf "$PKGDIR"/usr/glibc-compat/lib/gconv && \ + rm -rf "$PKGDIR"/usr/glibc-compat/lib/getconf && \ + rm -rf "$PKGDIR"/usr/glibc-compat/lib/audit && \ + rm -rf "$PKGDIR"/usr/glibc-compat/share && \ + rm -rf "$PKGDIR"/usr/glibc-compat/var + + +FROM alpine:3.6 + +RUN apk update && apk add --no-cache openssl ca-certificates +COPY --from=glibc /pkgdata/ / + +RUN mkdir -p /lib /lib64 /usr/glibc-compat/lib/locale /etc && \ + ln -s /lib/libz.so.1 /usr/glibc-compat/lib/ && \ + ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib && \ + ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2 && \ + ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \ + ln -s /usr/glibc-compat/etc/ld.so.cache /etc/ld.so.cache COPY dist/docker-compose-Linux-x86_64 /usr/local/bin/docker-compose diff --git a/README.md b/README.md index e3ca8f833..ea07f6a7d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Installation and documentation - Full documentation is available on [Docker's website](https://docs.docker.com/compose/). - If you have any questions, you can talk in real-time with other developers in the #docker-compose IRC channel on Freenode. [Click here to join using IRCCloud.](https://www.irccloud.com/invite?hostname=irc.freenode.net&channel=%23docker-compose) -- Code repository for Compose is on [Github](https://github.com/docker/compose) +- Code repository for Compose is on [GitHub](https://github.com/docker/compose) - If you find any problems please fill out an [issue](https://github.com/docker/compose/issues/new) Contributing diff --git a/compose/__init__.py b/compose/__init__.py index e5e83434f..6688ef4f1 100644 --- a/compose/__init__.py +++ b/compose/__init__.py @@ -1,4 +1,4 @@ from __future__ import absolute_import from __future__ import unicode_literals -__version__ = '1.19.0-rc3' +__version__ = '1.19.0' diff --git a/compose/service.py b/compose/service.py index b1f7d707b..6830c4d7b 100644 --- a/compose/service.py +++ b/compose/service.py @@ -849,10 +849,10 @@ class Service(object): override_options['mounts'] = [build_mount(v) for v in container_mounts] or None else: # Workaround for 3.2 format - self.options['tmpfs'] = self.options.get('tmpfs') or [] + override_options['tmpfs'] = self.options.get('tmpfs') or [] for m in container_mounts: if m.is_tmpfs: - self.options['tmpfs'].append(m.target) + override_options['tmpfs'].append(m.target) else: override_options['binds'].append(m.legacy_repr()) container_options['volumes'][m.target] = {} diff --git a/script/run/run.sh b/script/run/run.sh index 7355d9181..ae55ff759 100755 --- a/script/run/run.sh +++ b/script/run/run.sh @@ -15,7 +15,7 @@ set -e -VERSION="1.19.0-rc3" +VERSION="1.19.0" IMAGE="docker/compose:$VERSION" diff --git a/tests/unit/service_test.py b/tests/unit/service_test.py index 92d7f08d5..d0c0b0900 100644 --- a/tests/unit/service_test.py +++ b/tests/unit/service_test.py @@ -13,6 +13,7 @@ from compose.config.types import ServicePort from compose.config.types import ServiceSecret from compose.config.types import VolumeFromSpec from compose.config.types import VolumeSpec +from compose.const import API_VERSIONS from compose.const import LABEL_CONFIG_HASH from compose.const import LABEL_ONE_OFF from compose.const import LABEL_PROJECT @@ -601,6 +602,25 @@ class ServiceTest(unittest.TestCase): } assert config_dict == expected + def test_config_hash_matches_label(self): + self.mock_client.inspect_image.return_value = {'Id': 'abcd'} + service = Service( + 'foo', + image='example.com/foo', + client=self.mock_client, + network_mode=NetworkMode('bridge'), + networks={'bridge': {}}, + links=[(Service('one', client=self.mock_client), 'one')], + volumes_from=[VolumeFromSpec(Service('two', client=self.mock_client), 'rw', 'service')] + ) + config_hash = service.config_hash + + for api_version in set(API_VERSIONS.values()): + self.mock_client.api_version = api_version + assert service._get_container_create_options({}, 1)['labels'][LABEL_CONFIG_HASH] == ( + config_hash + ) + def test_remove_image_none(self): web = Service('web', image='example', client=self.mock_client) assert not web.remove_image(ImageType.none)