mirror of https://github.com/docker/docs.git
Remove makedmg
This commit is contained in:
parent
313c825a08
commit
766da7f8d8
|
|
@ -186,14 +186,7 @@ RUN sed -i \
|
||||||
-e "s/%KITEMATICAPP_VERSION%/$KITEMATIC_VERSION/g" \
|
-e "s/%KITEMATICAPP_VERSION%/$KITEMATIC_VERSION/g" \
|
||||||
mpkg/Resources/en.lproj/Localizable.strings
|
mpkg/Resources/en.lproj/Localizable.strings
|
||||||
|
|
||||||
# Make DMG rootfs
|
|
||||||
RUN mkdir -p /dmg
|
|
||||||
|
|
||||||
# Repackage back. Yes, --compression=none is mandatory.
|
# Repackage back. Yes, --compression=none is mandatory.
|
||||||
# or this won't install in OSX.
|
# or this won't install in OSX.
|
||||||
RUN cd /mpkg && \
|
RUN cd /mpkg && \
|
||||||
xar -c --compression=none -f /dmg/DockerToolbox.pkg .
|
xar -c --compression=none -f /DockerToolbox.pkg .
|
||||||
|
|
||||||
COPY makedmg.sh /
|
|
||||||
|
|
||||||
CMD ["/makedmg.sh", "docker.dmg", "Docker", "/dmg"]
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,14 @@ default: dockerbuild
|
||||||
|
|
||||||
dockerbuild: clean
|
dockerbuild: clean
|
||||||
docker build -t $(DOCKER_IMAGE) .
|
docker build -t $(DOCKER_IMAGE) .
|
||||||
docker run --privileged -i -t --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)"
|
docker run --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)"
|
||||||
docker cp "$(DOCKER_CONTAINER)":/dmg/DockerToolbox.pkg .
|
docker cp "$(DOCKER_CONTAINER)":/DockerToolbox.pkg .
|
||||||
|
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
||||||
mv DockerToolbox.pkg DockerToolboxUnsigned.pkg
|
mv DockerToolbox.pkg DockerToolboxUnsigned.pkg
|
||||||
productsign --sign "3rd Party Mac Developer Installer: Docker Inc" DockerToolboxUnsigned.pkg DockerToolbox.pkg
|
productsign --sign "3rd Party Mac Developer Installer: Docker Inc" DockerToolboxUnsigned.pkg DockerToolbox.pkg
|
||||||
rm DockerToolboxUnsigned.pkg
|
rm DockerToolboxUnsigned.pkg
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f Docker.pkg
|
rm -f DockerToolbox.pkg
|
||||||
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# DMG Creation Script
|
|
||||||
# Usage: makedmg <imagename> <imagetitle> <contentdir>
|
|
||||||
#
|
|
||||||
# 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 <imagename> <imagetitle> <contentdir>"
|
|
||||||
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
|
|
||||||
Loading…
Reference in New Issue