diff --git a/Dockerfile b/Dockerfile index b5a81f5..34a3252 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ MAINTAINER steven.thwaites@docker.com RUN apk add --update py2-pip # Upgrade pip -RUN pip install --upgrade pip +#RUN pip install --upgrade pip +RUN pip install pip # Install Python modules needed by the Python app COPY requirements.txt /usr/src/app/ diff --git a/Dockerfile.win b/Dockerfile.win new file mode 100644 index 0000000..afd2369 --- /dev/null +++ b/Dockerfile.win @@ -0,0 +1,18 @@ +# Use the official python windows image as a base +FROM python:3-windowsservercore + +# Maintainer +LABEL maintainer "patrick.bleek@docker.com" + +# Install flask +RUN ["pip", install flask"] + +# Copy files required for the app to run +COPY ["app.py", "c:/usr/src/app/"] +COPY ["templates/index.html", "c:/usr/src/app/templates/"] + +# Expose the app on Flask default (5000) +EXPOSE 5000 + +# Run the application +CMD ["python", "c:/usr/src/app/app.py"] diff --git a/README_WINDOWS.md b/README_WINDOWS.md new file mode 100644 index 0000000..87a10e8 --- /dev/null +++ b/README_WINDOWS.md @@ -0,0 +1,45 @@ +# Build Ship Run + +## Demo setup + +1. Install Windows Server 2016 (either local as a VM or through AWS/Azure) + +2. Install Docker-EE for Windows Server + + `Install-Module -Name DockerMsftProvider -Repository PSGallery -Force` + + `Install-Package -Name docker -ProviderName DockerMsftProvider -Force` + + `Restart-Computer -Force` + +3. Install chocolatey for easy install of additional tools + + `iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex` + +4. Install git + + `choco install git -y` + +## Running the demo + +1. Clone the repository + + `git clone https://github.com/pvdbleek/catweb` + +2. Rename the Dockerfile for Windows + + `ren Dockerfile.win Dockerfile` + +3. Build your image + + `docker build -t catweb .` + +4. Run the image + + `docker run -ti -p 5000:5000 catweb` + +5. Use docker inspect to find the IP of the container + +6. Open Internet Explorer and point it to + + `http://xxx.xxx.xxx.xxx:5000`