diff --git a/osx/Dockerfile b/osx/Dockerfile index 70aab23b78..af3bc7566c 100644 --- a/osx/Dockerfile +++ b/osx/Dockerfile @@ -186,14 +186,7 @@ RUN sed -i \ -e "s/%KITEMATICAPP_VERSION%/$KITEMATIC_VERSION/g" \ mpkg/Resources/en.lproj/Localizable.strings -# Make DMG rootfs -RUN mkdir -p /dmg - # Repackage back. Yes, --compression=none is mandatory. # or this won't install in OSX. RUN cd /mpkg && \ - xar -c --compression=none -f /dmg/DockerToolbox.pkg . - -COPY makedmg.sh / - -CMD ["/makedmg.sh", "docker.dmg", "Docker", "/dmg"] + xar -c --compression=none -f /DockerToolbox.pkg . diff --git a/osx/Makefile b/osx/Makefile index 666f4749b3..2bd414ffa4 100644 --- a/osx/Makefile +++ b/osx/Makefile @@ -6,13 +6,14 @@ default: dockerbuild dockerbuild: clean docker build -t $(DOCKER_IMAGE) . - docker run --privileged -i -t --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)" - docker cp "$(DOCKER_CONTAINER)":/dmg/DockerToolbox.pkg . + docker run --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)" + docker cp "$(DOCKER_CONTAINER)":/DockerToolbox.pkg . + docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true mv DockerToolbox.pkg DockerToolboxUnsigned.pkg productsign --sign "3rd Party Mac Developer Installer: Docker Inc" DockerToolboxUnsigned.pkg DockerToolbox.pkg rm DockerToolboxUnsigned.pkg clean: - rm -f Docker.pkg + rm -f DockerToolbox.pkg docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true diff --git a/osx/makedmg.sh b/osx/makedmg.sh deleted file mode 100755 index 964e7a8832..0000000000 --- a/osx/makedmg.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# DMG Creation Script -# Usage: makedmg -# -# Based on makedmg by Jon Cowie -# -# imagename: The output file name of the image, ie foo.dmg -# imagetitle: The title of the DMG File as displayed in OS X -# contentdir: The directory containing the content you want the DMG file to contain - -if [ ! $# == 3 ]; then - echo "Usage: $0 " -else - OUTPUT=$1 - TITLE=$2 - CONTENTDIR=$3 - FILESIZE=$(du -sm "${CONTENTDIR}" | cut -f1) - FILESIZE=$((${FILESIZE} + 5)) - USER=$(whoami) - TMPDIR="/tmp/dmgdir" - - if [ "${USER}" != "root" ]; then - echo "$0 must be run as root!" - else - echo "Creating DMG File..." - dd if=/dev/zero of="${OUTPUT}" bs=1M count=$FILESIZE - mkfs.hfsplus -v "${TITLE}" "${OUTPUT}" - - echo "Mounting DMG File..." - mkdir -p ${TMPDIR} - mount -t hfsplus -o loop "${OUTPUT}" "${TMPDIR}" - - echo "Copying content to DMG File..." - cp -R "${CONTENTDIR}"/* "${TMPDIR}" - - echo "Unmounting DMG File..." - umount "${TMPDIR}" - rm -rf "${TMPDIR}" - - echo "All Done!" - fi -fi