Skip to content

Instantly share code, notes, and snippets.

@loganwright
Last active April 30, 2017 02:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save loganwright/fd269cffcb9a03cd87504cd4a618d0fb to your computer and use it in GitHub Desktop.
Save loganwright/fd269cffcb9a03cd87504cd4a618d0fb to your computer and use it in GitHub Desktop.
Docker

Dockerfile

FROM ibmcom/swift-ubuntu:latest

# Install Vapor Toolbox
RUN curl -sL toolbox.vapor.sh | bash

# Set work dir to /vapor
WORKDIR /vapor

Create In local directory w/ ./Dockerfile

docker build -t vapor .

Build

docker run -it -v $(pwd):/vapor vapor:latest vapor build

Run

docker run -d -v $(pwd):/vapor -p 8080:8080 vapor:latest vapor run

Prefix

Prefix commands with:

docker run -it -v $(pwd):/vapor vapor:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment