mirror of
https://github.com/docker/docs.git
synced 2026-11-06 12:54:24 +03:00
Merge branch 'docker-build' into plugins
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
dist
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -19,3 +19,6 @@ build/
|
||||
xcuserdata
|
||||
profile
|
||||
*.moved-aside
|
||||
|
||||
# output
|
||||
dist
|
||||
|
||||
54
Dockerfile.windows
Normal file
54
Dockerfile.windows
Normal file
@@ -0,0 +1,54 @@
|
||||
FROM debian:jessie
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN sed -i "s/main/main contrib non-free/" etc/apt/sources.list
|
||||
RUN apt-get update && apt-get install -yq wine curl unrar unzip
|
||||
|
||||
# innosetup
|
||||
RUN mkdir innosetup && \
|
||||
cd innosetup && \
|
||||
curl -fsSL -o innounp043.rar "https://downloads.sourceforge.net/project/innounp/innounp/innounp%200.43/innounp043.rar?r=&ts=1439566551&use_mirror=skylineservers" && \
|
||||
unrar e innounp043.rar
|
||||
|
||||
RUN cd innosetup && \
|
||||
curl -fsSL -o is-unicode.exe http://www.jrsoftware.org/download.php/is-unicode.exe && \
|
||||
wine "./innounp.exe" -e "is-unicode.exe"
|
||||
|
||||
# installer components
|
||||
ENV INSTALLER_VERSION 1.8.1a
|
||||
ENV DOCKER_VERSION 1.8.1
|
||||
ENV DOCKER_MACHINE_VERSION 0.4.0
|
||||
ENV BOOT2DOCKER_ISO_VERSION $DOCKER_VERSION
|
||||
ENV KITEMATIC_VERSION 0.8.2
|
||||
ENV VIRTUALBOX_VERSION 5.0.0
|
||||
ENV VIRTUALBOX_REVISION 101573
|
||||
ENV MSYSGIT_VERSION 1.9.5-preview20150319
|
||||
|
||||
RUN mkdir /bundle
|
||||
WORKDIR /bundle
|
||||
RUN curl -fsSL -o docker.exe "https://get.docker.com/builds/Windows/x86_64/docker-$DOCKER_VERSION.exe"
|
||||
RUN curl -fsSL -o docker-machine.exe "https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine_windows-amd64.exe"
|
||||
RUN curl -fsSL -o boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v$BOOT2DOCKER_ISO_VERSION/boot2docker.iso
|
||||
RUN curl -fsSL -o kitematic.zip "https://github.com/kitematic/kitematic/releases/download/v$KITEMATIC_VERSION/Kitematic-$KITEMATIC_VERSION-Windows-Alpha.zip" && \
|
||||
mkdir kitematic && \
|
||||
cd kitematic && \
|
||||
unzip ../kitematic.zip && \
|
||||
rm ../kitematic.zip
|
||||
RUN curl -fsSL -o Git.exe "https://github.com/msysgit/msysgit/releases/download/Git-$MSYSGIT_VERSION/Git-$MSYSGIT_VERSION.exe"
|
||||
RUN curl -fsSL -o virtualbox.exe "http://download.virtualbox.org/virtualbox/$VIRTUALBOX_VERSION/VirtualBox-$VIRTUALBOX_VERSION-$VIRTUALBOX_REVISION-Win.exe"
|
||||
RUN wine virtualbox.exe -extract -silent -path . && \
|
||||
rm virtualbox.exe && \
|
||||
rm *x86.msi && \
|
||||
mv *_amd64.msi VirtualBox_amd64.msi
|
||||
|
||||
RUN echo "{\"event\":\"Installer Finished\",\"properties\":{\"token\":\"$MIXPANEL_TOKEN\",\"version\":\"$INSTALLER_VERSION\",\"os\":\"darwin\"}}" | base64 | tr -d '\n' > started.txt
|
||||
RUN echo "{\"event\":\"Installer Finished\",\"properties\":{\"token\":\"$MIXPANEL_TOKEN\",\"version\":\"$INSTALLER_VERSION\",\"os\":\"darwin\"}}" | base64 | tr -d '\n' > finished.txt
|
||||
|
||||
# Add installer resources
|
||||
COPY windows /installer
|
||||
|
||||
WORKDIR /installer
|
||||
RUN rm -rf /tmp/.wine-0/
|
||||
RUN wine ../innosetup/ISCC.exe Toolbox.iss /DMyAppVersion=$INSTALLER_VERSION
|
||||
29
Makefile
Normal file
29
Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
DOCKER_OSX_IMAGE := osx-installer
|
||||
DOCKER_WINDOWS_IMAGE := windows-installer
|
||||
DOCKER_OSX_CONTAINER := build-osx-installer
|
||||
DOCKER_WINDOWS_CONTAINER := build-windows-installer
|
||||
|
||||
default: osx windows
|
||||
@true
|
||||
|
||||
osx: clean-osx
|
||||
docker build -t $(DOCKER_OSX_IMAGE) -f Dockerfile.osx .
|
||||
docker run --name "$(DOCKER_OSX_CONTAINER)" "$(DOCKER_OSX_IMAGE)"
|
||||
mkdir -p dist
|
||||
docker cp "$(DOCKER_OSX_CONTAINER)":/DockerToolbox.pkg dist/
|
||||
docker rm "$(DOCKER_OSX_CONTAINER)" 2>/dev/null || true
|
||||
|
||||
windows: clean-windows
|
||||
docker build -t $(DOCKER_WINDOWS_IMAGE) -f Dockerfile.windows .
|
||||
docker run --name "$(DOCKER_WINDOWS_CONTAINER)" "$(DOCKER_WINDOWS_IMAGE)"
|
||||
mkdir -p dist
|
||||
docker cp "$(DOCKER_WINDOWS_CONTAINER)":/installer/Output/DockerToolbox.exe dist/
|
||||
docker rm "$(DOCKER_WINDOWS_CONTAINER)" 2>/dev/null || true
|
||||
|
||||
clean-osx:
|
||||
rm -f DockerToolbox-*.pkg
|
||||
docker rm "$(DOCKER_OSX_CONTAINER)" 2>/dev/null || true
|
||||
|
||||
clean-windows:
|
||||
rm -f DockerToolbox-*.exe
|
||||
docker rm "$(DOCKER_WINDOWS_CONTAINER)" 2>/dev/null || true
|
||||
16
osx/Makefile
16
osx/Makefile
@@ -1,16 +0,0 @@
|
||||
DOCKER_IMAGE := osx-installer
|
||||
DOCKER_CONTAINER := build-osx-installer
|
||||
|
||||
default: dockerbuild
|
||||
@true
|
||||
|
||||
dockerbuild: clean
|
||||
docker build -t $(DOCKER_IMAGE) .
|
||||
docker run --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)"
|
||||
docker cp "$(DOCKER_CONTAINER)":/DockerToolbox.pkg .
|
||||
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
||||
|
||||
clean:
|
||||
rm -f DockerToolbox.pkg
|
||||
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#Docker Toolbox for Mac OS X
|
||||
|
||||
Installation [instructions](https://docs.docker.com/mac/started/) available on the Docker documentation site.
|
||||
|
||||
##How to build
|
||||
|
||||
Running `make` will produce a `DockerToolbox.pkg` installer.
|
||||
@@ -1,47 +0,0 @@
|
||||
# Building the Windows Toolbox
|
||||
|
||||
1. Install Inno Setup 5 non-unicode: http://www.jrsoftware.org/isdl.php (`isetup-5.x.x-unicode.exe`).
|
||||
|
||||
2. Install `kSignCMD`: http://codesigning.ksoftware.net/ (click "Download kSign"
|
||||
and then "FREE DOWNLOAD" or "Click Here to Download kSign", which will likely be
|
||||
a link to http://cdn1.ksoftware.net/ksign_installer.exe)
|
||||
|
||||
3. Install the `docker-code-signing.pfx` certificate somewhere (the instructions
|
||||
below assume `Z:\sven\src\docker\windows-installer\docker-code-signing.pfx`);
|
||||
you will need the password (`d_get_from_core` below).
|
||||
|
||||
4. Open `Toolbox.iss` in the Inno Setup Compiler. It has a few constants at
|
||||
the top that are important to make note of (especially `MyAppVersion` and the
|
||||
path variables `dockerCli`, `dockerMachineCli`, `kitematicSetup`, `b2dIso`, `msysGit`, `virtualBoxMsi`, and `virtualBoxCommon`).
|
||||
|
||||
5. Launch **Inno Setup Compiler** by opening `Toolbox.iss` and add code signing
|
||||
by applying the following steps:
|
||||
|
||||
- Click "Tools" --> "Configure Sign Tools" > "Add"
|
||||
- "Name of the Sign Tool:" `ksign`
|
||||
- "Command of the Sign Tool:" `"C:\Program Files (x86)\kSign\kSignCMD.exe" /f Z:\sven\src\docker\toolbox\docker-code-signing.pfx /p d_get_from_core $p`
|
||||
|
||||
# Releasing a new version
|
||||
|
||||
Update the versions of the dependencies in `bundle.sh`.
|
||||
|
||||
Update `#define MyAppVersion` line in `Toolbox.iss`.
|
||||
|
||||
# Downloading bundle dependencies
|
||||
|
||||
Open a git bash window in this directory and run script:
|
||||
|
||||
./bundle.sh
|
||||
|
||||
This should be downloading dependencies with their correct versions to `bundle\`
|
||||
folder where the Inno Setup Compiler can pick up from.
|
||||
|
||||
# Compiling the installer
|
||||
|
||||
After configuring, open `Toolbox.iss` with Inno Setup Compiler and hit
|
||||
**'Build'**. The results will be in the `Output` folder.
|
||||
|
||||
This can be done through commandline as welll. Launch a cmd.exe shell from this
|
||||
directory and run:
|
||||
|
||||
"c:\Program Files (x86)\Inno Setup 5\ISCC.exe" Toolbox.iss
|
||||
@@ -2,39 +2,42 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Docker Toolbox"
|
||||
<<<<<<< HEAD
|
||||
#define MyAppVersion "1.8.1b"
|
||||
=======
|
||||
>>>>>>> docker-build
|
||||
#define MyAppPublisher "Docker"
|
||||
#define MyAppURL "https://docker.com"
|
||||
#define MyAppContact "https://docs.docker.com"
|
||||
|
||||
#define b2dIsoPath ".\bundle\Boot2Docker\boot2docker.iso"
|
||||
#define b2dIsoPath "..\bundle\boot2docker.iso"
|
||||
|
||||
#define dockerCli ".\bundle\docker\docker.exe"
|
||||
#define dockerMachineCli ".\bundle\docker\docker-machine.exe"
|
||||
#define dockerCli "..\bundle\docker.exe"
|
||||
#define dockerMachineCli "..\bundle\docker-machine.exe"
|
||||
|
||||
#define kitematic ".\bundle\kitematic"
|
||||
#define kitematic "..\bundle\kitematic"
|
||||
|
||||
#define msysGit ".\bundle\msysGit\Git.exe"
|
||||
#define msysGit "..\bundle\Git.exe"
|
||||
|
||||
#define virtualBoxCommon ".\bundle\VirtualBox\common.cab"
|
||||
#define virtualBoxMsi ".\bundle\VirtualBox\VirtualBox_amd64.msi"
|
||||
#define virtualBoxCommon "..\bundle\common.cab"
|
||||
#define virtualBoxMsi "..\bundle\VirtualBox_amd64.msi"
|
||||
|
||||
#define EventStartedFile FileOpen(".\bundle\started.txt")
|
||||
#define EventStartedFile FileOpen("..\bundle\started.txt")
|
||||
#define EventStartedData = FileRead(EventStartedFile)
|
||||
#expr FileClose(EventStartedFile)
|
||||
#undef EventStartedFile
|
||||
|
||||
#define EventFinishedFile FileOpen(".\bundle\finished.txt")
|
||||
#define EventFinishedFile FileOpen("..\bundle\finished.txt")
|
||||
#define EventFinishedData = FileRead(EventFinishedFile)
|
||||
#expr FileClose(EventFinishedFile)
|
||||
#undef EventFinishedFile
|
||||
#undef EventFinishedFile
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{FC4417F0-D7F3-48DB-BCE1-F5ED5BAFFD91}
|
||||
AppCopyright={#MyAppPublisher}
|
||||
AppId={{FC4417F0-D7F3-48DB-BCE1-F5ED5BAFFD91}
|
||||
AppContact={#MyAppContact}
|
||||
AppComments={#MyAppURL}
|
||||
AppName={#MyAppName}
|
||||
@@ -53,7 +56,7 @@ DisableProgramGroupPage=yes
|
||||
;InfoBeforeFile=.\LICENSE
|
||||
;DisableFinishedPage
|
||||
;InfoAfterFile=
|
||||
OutputBaseFilename=DockerToolbox-{#MyAppVersion}
|
||||
OutputBaseFilename=DockerToolbox
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
WizardImageFile=windows-installer-side.bmp
|
||||
@@ -66,7 +69,7 @@ WizardImageBackColor=$22EBB8
|
||||
; in the "Add/Remove" list:
|
||||
UninstallDisplayIcon={app}\unins000.exe
|
||||
|
||||
SignTool=ksign /d $q{#MyAppName}$q /du $q{#MyAppURL}$q $f
|
||||
; SignTool=ksign /d $q{#MyAppName}$q /du $q{#MyAppURL}$q $f
|
||||
|
||||
SetupIconFile=toolbox.ico
|
||||
|
||||
@@ -393,4 +396,4 @@ begin
|
||||
end;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
end;
|
||||
|
||||
BIN
windows/windows-installer-logo.bmp
Normal file → Executable file
BIN
windows/windows-installer-logo.bmp
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.6 KiB |
BIN
windows/windows-installer-side.bmp
Normal file → Executable file
BIN
windows/windows-installer-side.bmp
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 151 KiB |
Reference in New Issue
Block a user