From 9a4669067d84c2a7b533967a0e3e801612bff559 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 7 Aug 2017 17:07:56 -0400 Subject: [PATCH] docker image --- Dockerfile | 11 +++++++++++ build.ps1 | 13 +++++++++++++ build.sh | 16 ++++++++++++++++ entrypoint.sh | 3 +++ 4 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 build.ps1 create mode 100644 build.sh create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..853f60e158 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node + +RUN npm install http-server -g + +WORKDIR /app +EXPOSE 80 +COPY ./dist . + +COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000000..b75d046fce --- /dev/null +++ b/build.ps1 @@ -0,0 +1,13 @@ +$dir = Split-Path -Parent $MyInvocation.MyCommand.Path + +echo "`n# Building Web" + +echo "`nBuilding app" +echo "npm version $(npm --version)" +echo "gulp version $(gulp --version)" +npm install +gulp dist + +echo "`nBuilding docker image" +docker --version +docker build -t bitwarden/web $dir\. diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000..ebbec0bd5d --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +DIR="$(dirname $(readlink -f $0))" + +echo -e "\n# Building Web" + +echo -e "\nBuilding app" +echo -e "npm version $(npm --version)" +echo -e "gulp version $(gulp --version)" +npm install +gulp dist + +echo -e "\nBuilding docker image" +docker --version +docker build -t bitwarden/web $DIR/. diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000000..b5b422fe9c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +http-server ./ -p 80 -d False --utc