Skip to content

Instantly share code, notes, and snippets.

@jhonny-me
Forked from loganwright/docker.md
Created October 8, 2016 15:11
Show Gist options
  • Save jhonny-me/58eb7c549fd7983792c73c2daf1ef920 to your computer and use it in GitHub Desktop.
Save jhonny-me/58eb7c549fd7983792c73c2daf1ef920 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