1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Bump RC versions; Unified script at end of installer

This commit is contained in:
Jeffrey Morgan
2015-08-08 00:38:35 -07:00
parent 7d0a06e0b5
commit de986d82af
8 changed files with 85 additions and 95 deletions

View File

@@ -26,7 +26,7 @@ RUN curl -fsSL -o /vbox.dmg http://download.virtualbox.org/virtualbox/$VBOX_VERS
# Download the Docker parts
ENV DOCKER_VERSION 1.8.0-rc2
ENV DOCKER_VERSION 1.8.0-rc3
RUN curl -fsSL -o /docker https://test.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION
RUN chmod +x /docker
@@ -41,7 +41,7 @@ RUN chmod +x /docker-compose
ENV BOOT2DOCKER_ISO_VERSION $DOCKER_VERSION
RUN curl -fsSL -o /boot2docker.iso https://github.com/tianon/boot2docker-legacy/releases/download/v1.8.0-rc2/boot2docker.iso
ENV KITEMATIC_VERSION 0.8.0-rc4
ENV KITEMATIC_VERSION 0.8.0-rc5
RUN curl -fsSL -o /kitematic.zip https://github.com/kitematic/kitematic/releases/download/v$KITEMATIC_VERSION/Kitematic-$KITEMATIC_VERSION-Mac.zip
# ENV INSTALLER_VERSION $DOCKER_VERSION
@@ -91,8 +91,6 @@ RUN cd /mpkg/docker.pkg && \
# dockermachine.pkg
RUN cd /mpkg/dockermachine.pkg && \
cd Scripts && find . | cpio -o --format odc | gzip -c > ../Scripts.bin && cd .. && \
rm -r Scripts && mv Scripts.bin Scripts && \
mkdir rootfs && \
cd rootfs && \
mkdir -p usr/local/bin && \
@@ -148,8 +146,6 @@ RUN cd /mpkg/boot2dockeriso.pkg && \
# dockerquickstartterminalapp.pkg
RUN cd /mpkg/dockerquickstartterminalapp.pkg && \
cd Scripts && find . | cpio -o --format odc | gzip -c > ../Scripts.bin && cd .. && \
rm -r Scripts && mv Scripts.bin Scripts && \
mkdir ./rootfs && \
cd ./rootfs && \
mv /mpkg/Docker\ Quickstart\ Terminal.app . && \

View File

@@ -21,9 +21,6 @@
<choice id="choiceDockerComposeCLI" title="choiceDockerComposeCLI_title" description="choiceDockerComposeCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockercompose"/>
</choice>
<choice id="choiceDockerQuickstartTerminalAPP" title="choiceDockerQuickstartTerminalAPP_title" description="choiceDockerQuickstartTerminalAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"/>
</choice>
<choice id="choiceKitematicAPP" title="choiceKitematicAPP_title" description="choiceKitematicAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.kitematicapp"/>
</choice>
@@ -35,6 +32,41 @@
<pkg-ref id="io.docker.pkg.dockercompose">
<bundle-version/>
</pkg-ref>
<pkg-ref id="io.docker.pkg.kitematicapp" auth="Root" version="%KITEMATICAPP_VERSION%" installKBytes="%KITEMATICAPP_INSTALL_KBYTES%">#kitematicapp.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.kitematicapp">
<bundle-version/>
</pkg-ref>
<choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="vboxNeedsUpgrade()" start_enabled="vboxNeedsUpgrade()" start_visible="true">
<pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="%VBOX_VERSION%" installKBytes="935">#VBoxKEXTs.pkg</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root" version="%VBOX_VERSION%" installKBytes="247220">#VirtualBox.pkg</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root" version="%VBOX_VERSION%" installKBytes="4">#VirtualBoxCLI.pkg</pkg-ref>
</choice>
<pkg-ref id="org.virtualbox.pkg.vboxkexts">
<bundle-version>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxNetAdp" path="VBoxNetAdp.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxDrv" path="VBoxDrv.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxNetFlt" path="VBoxNetFlt.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxUSB" path="VBoxUSB.kext"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualbox">
<bundle-version>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.app.VirtualBox" path="VirtualBox.app"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli">
<bundle-version/>
</pkg-ref>
<choice id="choiceBoot2DockerISO" title="choiceBoot2DockerISO_title" description="choiceBoot2DockerISO_msg" start_selected="true" start_enabled="true" start_visible="false">
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso"/>
</choice>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso" auth="Root" version="%BOOT2DOCKER_ISO_VERSION%" installKBytes="%BOOT2DOCKER_ISO_INSTALL_KBYTES%">#boot2dockeriso.pkg</pkg-ref>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso">
<bundle-version/>
</pkg-ref>
<choice id="choiceDockerQuickstartTerminalAPP" title="choiceDockerQuickstartTerminalAPP_title" description="choiceDockerQuickstartTerminalAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"/>
</choice>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp" auth="Root" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%">#dockerquickstartterminalapp.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp">
<bundle-version/>
@@ -43,6 +75,13 @@
<pkg-ref id="io.docker.pkg.kitematicapp">
<bundle-version/>
</pkg-ref>
<choice id="choiceDockerMachineCLI" title="choiceDockerMachineCLI_title" description="choiceDockerMachineCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockermachine"/>
</choice>
<pkg-ref id="io.docker.pkg.dockermachine" auth="Root" version="%DOCKERMACHINE_VERSION%" installKBytes="%DOCKERMACHINE_INSTALL_KBYTES%">#dockermachine.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.dockermachine">
<bundle-version/>
</pkg-ref>
<product id="io.docker.mpkg.docker" version="%INSTALLER_VERSION%"/>
<!-- Manually imported VBox Stuff -->
@@ -124,47 +163,4 @@
/* js:pkmk:end */
]]>
</script>
<choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="vboxNeedsUpgrade()" start_enabled="vboxNeedsUpgrade()" start_visible="true">
<pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="%VBOX_VERSION%" installKBytes="935">#VBoxKEXTs.pkg</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root" version="%VBOX_VERSION%" installKBytes="247220">#VirtualBox.pkg</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root" version="%VBOX_VERSION%" installKBytes="4">#VirtualBoxCLI.pkg</pkg-ref>
</choice>
<pkg-ref id="org.virtualbox.pkg.vboxkexts">
<bundle-version>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxNetAdp" path="VBoxNetAdp.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxDrv" path="VBoxDrv.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxNetFlt" path="VBoxNetFlt.kext"/>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.kext.VBoxUSB" path="VBoxUSB.kext"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualbox">
<bundle-version>
<bundle CFBundleShortVersionString="%VBOX_VERSION%" CFBundleVersion="%VBOX_VERSION%" id="org.virtualbox.app.VirtualBox" path="VirtualBox.app"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli">
<bundle-version/>
</pkg-ref>
<choice id="choiceBoot2DockerISO" title="choiceBoot2DockerISO_title" description="choiceBoot2DockerISO_msg" start_selected="true" start_enabled="true" start_visible="false">
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso"/>
</choice>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso" auth="Root" version="%BOOT2DOCKER_ISO_VERSION%" installKBytes="%BOOT2DOCKER_ISO_INSTALL_KBYTES%">#boot2dockeriso.pkg</pkg-ref>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso">
<bundle-version/>
</pkg-ref>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp" auth="Root" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%">#dockerquickstartterminalapp.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp">
<bundle-version/>
</pkg-ref>
<pkg-ref id="io.docker.pkg.kitematicapp" auth="Root" version="%KITEMATICAPP_VERSION%" installKBytes="%KITEMATICAPP_INSTALL_KBYTES%">#kitematicapp.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.kitematicapp">
<bundle-version/>
</pkg-ref>
<choice id="choiceDockerMachineCLI" title="choiceDockerMachineCLI_title" description="choiceDockerMachineCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockermachine"/>
</choice>
<pkg-ref id="io.docker.pkg.dockermachine" auth="Root" version="%DOCKERMACHINE_VERSION%" installKBytes="%DOCKERMACHINE_INSTALL_KBYTES%">#dockermachine.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.dockermachine">
<bundle-version/>
</pkg-ref>
</installer-gui-script>

View File

@@ -7,7 +7,7 @@
<body style="font-family: Helvetica, Sans-Serif;">
<h3>Quick-Start</h3>
<ol>
<li>Start Launchpad.</li>
<li>Start Launchpad or open /Applications/Docker.</li>
<li>Open the Docker Quickstart Terminal App.</li>
<li>At the command line, test your installation by entering: <br /><code>docker run hello-world</code></li>
<li>Visit the <a href="http://docs.docker.com/installation/mac">Docker OS X installation</a> to learn more about your new installation.</li>

View File

@@ -5,5 +5,45 @@ mkdir -p ~/.docker/machine/cache
cp /usr/local/share/boot2docker/boot2docker.iso ~/.docker/machine/cache/boot2docker.iso
chown -R $USER:staff ~/.docker
# Fix permissions on binaries
chown -R $USER:admin /usr/local/bin/docker
chown -R $USER:admin /usr/local/bin/docker-machine
chown -R $USER:admin /usr/local/bin/docker-compose
# Migrate Boot2Docker VM
BOOT2DOCKER_VM=boot2docker-vm
VM=default
sudo -u $USER /usr/local/bin/VBoxManage showvminfo $BOOT2DOCKER_VM &> /dev/null
BOOT2DOCKER_VM_EXISTS_CODE=$?
sudo -u $USER /usr/local/bin/VBoxManage showvminfo $VM &> /dev/null
VM_EXISTS_CODE=$?
# Exit if there's no boot2docker vm, or the destination VM already exists
if [ $BOOT2DOCKER_VM_EXISTS_CODE -eq 0 ] && [ $VM_EXISTS_CODE -ne 0 ]; then
# Prompt the user to migrate
osascript -e 'tell app "System Events" to display dialog "Migrate your existing Boot2Docker VM to work with the Docker Toolbox?\n \nYour existing Boot2Docker VM will not be affected. This should take about a minute." buttons {"Do not Migrate", "Migrate"} default button 2 cancel button 1 with icon 2 with title "Migrate Boot2Docker VM?"'
if [ $? -eq 0 ]; then
rm -rf ~/.docker/machine/machines/default
sudo -u $USER PATH=/Applications/VirtualBox.app/Contents/MacOS/:$PATH bash -c "/usr/local/bin/docker-machine -D create -d virtualbox --virtualbox-import-boot2docker-vm $BOOT2DOCKER_VM $VM" 2>&1 | sed -e '/BEGIN/,/END/d' > /tmp/toolbox-migration-logs.txt
if [ $? -eq 0 ]; then
osascript -e 'tell app "System Events" to display dialog "Boot2Docker VM migrated successfully to a Docker Machine VM named \"default\"" buttons {"Ok"} default button 1'
else
osascript -e 'tell app "System Events" to display dialog "Could not migrate the Boot2Docker VM. Please file an issue with the migration logs at https://github.com/docker/machine/issues/new." buttons {"Cancel", "View Migration Logs"} default button 2 cancel button 1 with icon 0 with title "Migration Failed"'
if [ $? -eq 0 ]; then
open -a TextEdit /tmp/toolbox-migration-logs.txt
fi
exit 1
fi
fi
fi
# Open Applications dir if it exists and is not empty
if [ -d /Applications/Docker ] && [ "$(ls -A /Applications/Docker)" ]; then
open /Applications/Docker
fi
curl -H "Content-Type: application/json" -X POST "https://api.mixpanel.com/track/?data=%EVENT_DATA%"

View File

@@ -7,7 +7,4 @@
<atomic-update-bundle/>
<strict-identifier/>
<relocate/>
<scripts>
<postinstall file="./postinstall"/>
</scripts>
</pkg-info>

View File

@@ -1,33 +0,0 @@
#!/bin/bash
ls -al ~/.docker/machine/cache/
# Migrate Boot2Docker VM
BOOT2DOCKER_VM=boot2docker-vm
VM=default
sudo -u $USER /usr/local/bin/VBoxManage showvminfo $BOOT2DOCKER_VM &> /dev/null
BOOT2DOCKER_VM_EXISTS_CODE=$?
sudo -u $USER /usr/local/bin/VBoxManage showvminfo $VM &> /dev/null
VM_EXISTS_CODE=$?
# Exit if there's no boot2docker vm, or the destination VM already exists
if [ $BOOT2DOCKER_VM_EXISTS_CODE -ne 0 ] || [ $VM_EXISTS_CODE -eq 0 ]; then
exit 0
fi
osascript -e 'tell app "System Events" to display dialog "Migrate your existing Boot2Docker VM to work with the Docker Toolbox?\n \nYour existing Boot2Docker VM will not be affected. This should take about a minute." buttons {"Do not Migrate", "Migrate"} default button 2 cancel button 1 with icon 2 with title "Migrate Boot2Docker VM?"'
if [ $? -eq 0 ]; then
rm -rf ~/.docker/machine/machines/default
sudo -u $USER PATH=/Applications/VirtualBox.app/Contents/MacOS/:$PATH bash -c "/usr/local/bin/docker-machine -D create -d virtualbox --virtualbox-import-boot2docker-vm $BOOT2DOCKER_VM $VM" 2>&1 | sed -e '/BEGIN/,/END/d' > /tmp/toolbox-migration-logs.txt
if [ $? -ne 0 ]; then
osascript -e 'tell app "System Events" to display dialog "Boot2Docker VM migrated successfully to a Docker Machine VM named \"default\"" buttons {"Ok"} default button 1'
else
osascript -e 'tell app "System Events" to display dialog "Could not migrate the Boot2Docker VM. Please file an issue with the migration logs at https://github.com/docker/machine/issues/new." buttons {"Cancel", "View Migration Logs"} default button 2 cancel button 1 with icon 0 with title "Migration Failed"'
if [ $? -eq 0 ]; then
open -a TextEdit /tmp/toolbox-migration-logs.txt
fi
exit 1
fi
fi

View File

@@ -7,7 +7,4 @@
<atomic-update-bundle/>
<strict-identifier/>
<relocate/>
<scripts>
<postinstall file="./postinstall"/>
</scripts>
</pkg-info>

View File

@@ -1,3 +0,0 @@
#!/bin/sh
open /Applications/Docker/