Skip to content

Commit

Permalink
Add docker container support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean P. Kane committed May 31, 2018
1 parent ccd743b commit 5d473f7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
@@ -0,0 +1,20 @@
FROM node:9.3-alpine

# If Github throtlling is an issue try building with something like:
# docker build --build-arg JSPM_GITHUB_AUTH_TOKEN="a_jspm_encrypted_github_token" .

ARG JSPM_GITHUB_AUTH_TOKEN=""
RUN mkdir /app
WORKDIR /app
ADD . /app
RUN apk add --no-cache git && \
npm install --global karma-cli && \
npm install jspm -g && \
jspm config registries.github.auth ${JSPM_GITHUB_AUTH_TOKEN} && \
npm install http-server -g && \
npm install && \
jspm install -y && \
jspm bundle-sfx --minify app && \
jspm config registries.github.auth ""
CMD ["http-server",".","-p","8080"]

18 changes: 17 additions & 1 deletion README.md
Expand Up @@ -32,7 +32,7 @@ npm install
jspm install
```

Additionally, for development we use `eslint` with `eslint-plugin-lodash`.
Additionally, for development we use `eslint` with `eslint-plugin-lodash`.

## Running server

Expand Down Expand Up @@ -62,3 +62,19 @@ favicon.ico
build.js
index.html
```

# Docker

## Building

`docker build .`
or
`docker build --build-arg JSPM_GITHUB_AUTH_TOKEN="a_jspm_encrypted_github_token" .`

## Running

`docker run -d -p 80:8080 ${IMAGE_ID}`
or for a community built image try:
`docker run -d -p 80:8080 spkane/quantum-game:latest`

and then open up a web browser and point it to port 80 on your Docker host.

0 comments on commit 5d473f7

Please sign in to comment.