Terms of Service | Privacy Policy | Cookie Policy

Skip to content
Snippets Groups Projects
Verified Commit ec4052ea authored by Uwe Plonus's avatar Uwe Plonus
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
*~
image: docker:stable
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
stages:
- build
- deploy
variables:
TEST_IMAGE: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME:test
DEPLOY_IMAGE: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME
build:
stage: build
script:
- docker build -f Dockerfile -t $TEST_IMAGE --build-arg CI_REGISTRY=$CI_REGISTRY --no-cache=true .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $TEST_IMAGE
- docker push $TEST_IMAGE
deploy:
stage: deploy
script:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $DEPLOY_IMAGE:latest
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $DEPLOY_IMAGE:latest
- docker tag $TEST_IMAGE $DEPLOY_IMAGE:$(date +%Y%m%d)
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $DEPLOY_IMAGE:$(date +%Y%m%d)
only:
- master
ARG CI_REGISTRY
FROM ${CI_REGISTRY}/sw4j-net/git/master:latest
RUN apt-get update && \
apt-get -y upgrade && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install nodejs && \
node -v && \
npm -v
This diff is collapsed.
# Introduction
This project creates a docker image with [node.js](https://nodejs.org/) installed.
The image can be used to build software using node.js.
This repository is mirrored to https://gitlab.com/sw4j-net/nodejs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment