Skip to content

Commit 8ed216f

Browse files
committed
feat(dockerfile): Add build command to npm scripts.
1 parent ae993ca commit 8ed216f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
# Stage 1 image
22
FROM mhart/alpine-node:8 as base
33

4-
LABEL maintainer="Jan Kuri <jan@bleenco.com>" \
5-
org.label-schema.schema-version="1.0" \
6-
org.label-schema.name="abstruse" \
7-
org.label-schema.description="Continuous integration platform, simple, scalable and fast" \
8-
org.label-schema.url="https://abstruse.bleenco.io/" \
9-
org.label-schema.vcs-url="https://github.com/bleenco/abstruse" \
10-
org.label-schema.vendor="Bleenco" \
11-
org.label-schema.vcs-ref="n/a" \
12-
org.label-schema.version="dev"
13-
144
ENV DOCKER_VERSION=17.09.0-ce
155

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

12+
2213
# Stage 2 image
2314
FROM base as build
2415

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

32+
LABEL maintainer="Jan Kuri <jan@bleenco.com>" \
33+
org.label-schema.schema-version="1.0" \
34+
org.label-schema.name="abstruse" \
35+
org.label-schema.description="Continuous integration platform, simple, scalable and fast" \
36+
org.label-schema.url="https://abstruse.bleenco.io/" \
37+
org.label-schema.vcs-url="https://github.com/bleenco/abstruse" \
38+
org.label-schema.vendor="Bleenco" \
39+
org.label-schema.vcs-ref="n/a" \
40+
org.label-schema.version="dev"
41+
4142
WORKDIR /app
4243

4344
RUN apk --no-cache add tini sqlite git

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build:prod": "npm run build && npm run build:app:prod",
1515
"build:app": "webpack --env.dev --progress",
1616
"build:app:prod": "webpack --env.aot --env.prod -p",
17+
"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}\" .",
1718
"start": "webpack-dev-server --env.dev --env.serve --progress --hot",
1819
"start:aot": "webpack-dev-server --env.aot --env.dev --env.serve --progress --hot",
1920
"lint": "tslint ./src/**/*.ts",

0 commit comments

Comments
 (0)