Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
histhub
linker
Commits
09b2e70a
Commit
09b2e70a
authored
May 31, 2018
by
Tobias Steiner
Browse files
Add docker build files
parent
299b2f64
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
09b2e70a
services
:
-
docker:dind
variables
:
IMAGE_TAG
:
$CI_REGISTRY/$CI_IMAGE:$CI_COMMIT_REF_NAME
LATEST_TAG
:
$CI_REGISTRY/$CI_IMAGE:latest
cache
:
paths
:
-
node_modules/
build
:
image
:
docker:latest
services
:
-
docker:dind
stage
:
build
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker build -t $IMAGE_TAG .
-
docker tag $IMAGE_TAG $LATEST_TAG
-
docker push $IMAGE_TAG
-
docker push $LATEST_TAG
Dockerfile
0 → 100644
View file @
09b2e70a
FROM
node:8-alpine
# add basic libs
RUN
apk
--no-cache
add
\
bash
\
g++
\
ca-certificates
\
lz4-dev
\
musl-dev
\
cyrus-sasl-dev
\
openssl-dev
\
make
\
python
\
bash
\
git
RUN
apk add
--no-cache
--virtual
.build-deps gcc zlib-dev libc-dev bsd-compat-headers py-setuptools libexecinfo libexecinfo-dev
# Create app directory
RUN
mkdir
-p
/usr/local/app
# Move to the app directory
WORKDIR
/usr/local/app
# copy app to the container
COPY
package.json package-lock.json config.json tsconfig.json /usr/local/app/
COPY
src /usr/local/app/src
# Install dependencies
RUN
npm
install
# build stuff
RUN
npm run build
# run app
CMD
node dist/index.js
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment