-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alpine based Docker image, metadata labels & Autobuild hooks
- Loading branch information
Showing
5 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
FROM node:6-onbuild | ||
FROM alpine:edge | ||
# Build-time metadata as defined at http://label-schema.org | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG VCS_URL | ||
ARG VERSION | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name="Gun - Offline First, Javascript Graph Database" \ | ||
# org.label-schema.description="Let it be pulled from Readme.md..." \ | ||
org.label-schema.url="http://gun.js.org" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.vendor="Pinnacle Digital" \ | ||
org.label-schema.version=$VERSION \ | ||
org.label-schema.schema-version="1.0" | ||
WORKDIR /app | ||
ADD . . | ||
ENV NPM_CONFIG_LOGLEVEL warn | ||
RUN apk update && apk upgrade \ | ||
&& apk add --no-cache ca-certificates nodejs \ | ||
&& npm install \ | ||
&& rm -rf /var/cache/* -rf /tmp/npm* | ||
EXPOSE 8080 | ||
CMD ["npm","start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg VCS_URL=`git remote get-url origin` \ | ||
--build-arg VERSION=$SOURCE_BRANCH -t $IMAGE_NAME . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
docker tag $IMAGE_NAME $DOCKER_REPO:latest | ||
docker push $DOCKER_REPO:latest |