Permalink
Browse files

feat(dockerfile): Add build command to npm scripts.

  • Loading branch information...
cooperaj committed Nov 7, 2017
1 parent ae993ca commit 8ed216f66df7d2315186a647ba43c301a7e9554f
Showing with 12 additions and 10 deletions.
  1. +11 −10 Dockerfile
  2. +1 −0 package.json
@@ -1,16 +1,6 @@
# Stage 1 image
FROM mhart/alpine-node:8 as base

LABEL maintainer="Jan Kuri <jan@bleenco.com>" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="abstruse" \
org.label-schema.description="Continuous integration platform, simple, scalable and fast" \
org.label-schema.url="https://abstruse.bleenco.io/" \
org.label-schema.vcs-url="https://github.com/bleenco/abstruse" \
org.label-schema.vendor="Bleenco" \
org.label-schema.vcs-ref="n/a" \
org.label-schema.version="dev"

ENV DOCKER_VERSION=17.09.0-ce

RUN apk --no-cache add openssl \
@@ -19,6 +9,7 @@ RUN apk --no-cache add openssl \
&& ln -s /tmp/docker/docker /usr/bin/docker && chmod 755 /usr/bin/docker && rm -rf /tmp/docker.tgz \
&& apk del openssl


# Stage 2 image
FROM base as build

@@ -38,6 +29,16 @@ RUN apk add --no-cache --virtual .build-dependencies make gcc g++ python curl sq
# Stage 3 image
FROM alpine:3.6

LABEL maintainer="Jan Kuri <jan@bleenco.com>" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="abstruse" \
org.label-schema.description="Continuous integration platform, simple, scalable and fast" \
org.label-schema.url="https://abstruse.bleenco.io/" \
org.label-schema.vcs-url="https://github.com/bleenco/abstruse" \
org.label-schema.vendor="Bleenco" \
org.label-schema.vcs-ref="n/a" \
org.label-schema.version="dev"

WORKDIR /app

RUN apk --no-cache add tini sqlite git
@@ -14,6 +14,7 @@
"build:prod": "npm run build && npm run build:app:prod",
"build:app": "webpack --env.dev --progress",
"build:app:prod": "webpack --env.aot --env.prod -p",
"build-image": "GIT_REV=$(git rev-parse --short HEAD); docker build -t bleenco/abstruse:${npm_package_version} --label org.label-schema.version=\"${npm_package_version}\" --label org.label-schema.vcs-ref=\"${GIT_REV}\" .",
"start": "webpack-dev-server --env.dev --env.serve --progress --hot",
"start:aot": "webpack-dev-server --env.aot --env.dev --env.serve --progress --hot",
"lint": "tslint ./src/**/*.ts",

0 comments on commit 8ed216f

Please sign in to comment.