Compare commits

..

60 Commits

Author SHA1 Message Date
221fd422d6 4.3.2 2016-08-30 23:55:45 +02:00
04e29ffd5e update npmpage installation 2016-08-30 23:55:21 +02:00
bc58522b12 Merge branch 'master' of gitlab.com:hosttoday/ht-docker-node 2016-07-18 03:57:31 +02:00
42760d7aeb switch to stable for default 2016-07-18 03:57:23 +02:00
a93e26ce98 Update README.md 2016-07-12 14:20:58 +00:00
a442040021 update lts version 2016-06-29 23:11:12 +02:00
87678e9bf4 fix ssh 2016-06-26 06:39:01 +02:00
23a4df0c35 add ssh 2016-06-26 06:25:07 +02:00
2fe58c23c3 Update Dockerfile_npmts 2016-06-26 02:56:21 +00:00
40fa047c24 update npm to ensure nodegit compatibility 2016-06-26 00:19:00 +02:00
e8c45ba38b add openssl to base Dockerfile 2016-06-25 21:04:10 +02:00
22adbef520 fix filename of test so it gets picked up by npmci 2016-06-17 15:08:08 +02:00
774a9a3e91 Update .gitlab-ci.yml 2016-06-13 13:06:55 +00:00
f829c38137 add some tests 2016-06-11 23:11:05 +02:00
6f27262366 fix npmts install 2016-06-11 23:00:43 +02:00
5ee60a65d6 fix npmci call 2016-06-11 21:25:09 +02:00
97f371890b now using npmci to install npmts 2016-06-11 20:24:36 +02:00
8630f4920d update ht-docker-node 2016-06-11 19:07:03 +02:00
cefe591b2a Update Dockerfile_npmts 2016-06-10 11:16:25 +00:00
87bc1f267a add version with npmdeploy installed 2016-06-10 08:43:25 +02:00
ced7c75cba fix npmts Dockerfile 2016-06-10 07:41:41 +02:00
371c7c11ea Merge branch 'master' of gitlab.com:hosttoday/ht-docker-node 2016-06-10 07:30:15 +02:00
a112bba2e1 update npmts to have npmts in path for all node tests. 2016-06-10 07:30:07 +02:00
9aff193ef9 Update README.md 2016-06-08 21:09:24 +00:00
37e997ebf2 fix test file 2016-06-07 07:55:05 +02:00
864ebf39a8 fix gitlab yml 2016-06-07 06:10:03 +02:00
27b65ae64a add tests for dockerfile with tag latest 2016-06-07 05:21:48 +02:00
cf8f10d032 update gitlab ci yml 2016-06-07 04:45:08 +02:00
9e10b04105 Update .gitlab-ci.yml 2016-06-05 08:25:22 +00:00
5d0fc29252 Update .gitlab-ci.yml 2016-06-05 05:07:38 +00:00
d27f9f11ae Update .gitlab-ci.yml 2016-06-05 04:36:03 +00:00
10bb62cc01 Update .gitlab-ci.yml 2016-06-04 22:16:58 +00:00
886211f908 add python3 2016-06-04 03:57:39 +02:00
e49776862e removed npmci from base 2016-06-04 03:51:32 +02:00
2c6ffe34fc fix 2016-06-04 03:38:39 +02:00
56a1bc4e0f fix gitlab-ci 2016-06-04 03:31:13 +02:00
2d0bc35096 update gitlab ci 2016-06-04 03:19:20 +02:00
fc8de3e5d1 fix 2016-06-04 03:03:00 +02:00
dfaf401f1b now building tags 2016-06-04 03:01:23 +02:00
6ad80e7aa9 update Dockerfile_stable 2016-06-04 02:51:18 +02:00
99c9645108 fix 2016-06-04 02:47:22 +02:00
6499eedc7b create tagged versions 2016-06-04 02:43:39 +02:00
4c75ba6e3f Add new file 2016-06-04 00:28:19 +00:00
53c013da51 Update .gitlab-ci.yml 2016-06-02 17:08:12 +00:00
fd432a3f16 Update .gitlab-ci.yml 2016-06-02 15:46:40 +00:00
c8a92cc2e2 Update .gitlab-ci.yml 2016-06-02 11:46:56 +00:00
d6ac184f9f Update .gitlab-ci.yml 2016-06-02 11:43:27 +00:00
c8db76b050 Update .gitlab-ci.yml 2016-06-02 11:37:23 +00:00
c587638b90 Update .gitlab-ci.yml 2016-06-01 07:43:17 +00:00
e20c79b3ab Update .gitlab-ci.yml 2016-05-30 14:46:00 +00:00
ae78db3097 Update .gitlab-ci.yml 2016-05-30 14:16:40 +00:00
e5ad68e7ca Update Dockerfile 2016-05-30 14:06:48 +00:00
6bd6665f63 Add new file 2016-05-30 13:22:51 +00:00
19deb73114 Update README.md 2016-05-30 02:19:09 +00:00
e08088c520 add npmci 2016-05-26 22:34:05 +02:00
30c57e2f3a add npmci 2016-05-26 21:50:07 +02:00
c81f3446c2 update node stack 2016-04-24 01:34:44 +02:00
b4e13ceffe updated nodejs lts version and improved bash use in Dockerfile 2016-04-22 01:52:21 +02:00
b8d3094ad7 improve README 2016-03-07 02:35:09 +00:00
f3b85d94eb added README 2016-03-07 02:32:20 +00:00
14 changed files with 153 additions and 24 deletions

54
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,54 @@
image: hosttoday/ht-docker-dbase
services:
- docker:dind
stages:
- build
- test
- release
- trigger
before_script:
- npm uninstall -g npmci
- npm install -g npmci
- npmci prepare docker
build:
stage: build
script:
- npmci build docker
tags:
- lossless
- priv
test:
stage: test
script:
- npmci test docker
only:
- master
tags:
- lossless
- priv
release:
stage: release
script:
- npmci publish docker
only:
- master
tags:
- lossless
- priv
trigger:
stage: trigger
script:
- npmci trigger
only:
- master
tags:
- lossless
- priv

View File

@ -1,36 +1,33 @@
FROM debian
FROM ubuntu:latest
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# important environment variables
ENV NODE_VERSION_LTS="4.4.7" NODE_VERSION_STABLE="6.3.0" NVM_DIR="/usr/local/nvm"
# Set debconf to run non-interactively
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Install base dependencies
RUN apt-get update && apt-get install -y -q --no-install-recommends \
# Set debconf to run non-interactively and install packages
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get update \
&& apt-get upgrade --no-install-recommends -y \
&& apt-get install -y -q --no-install-recommends \
software-properties-common \
apt-transport-https \
build-essential \
ca-certificates \
curl \
git \
libssl-dev \
ssh \
openssl \
python \
rsync \
software-properties-common \
wget \
&& rm -rf /var/lib/apt/lists/*
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 4.3.1
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
# Install nvm with node and npm
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
&& bash -c "source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION_STABLE \
&& nvm alias default $NODE_VERSION_STABLE \
&& nvm use default \
&& npm install -g npm"
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN node -v
RUN npm -v
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_STABLE/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_STABLE/bin:$PATH

10
Dockerfile_lts Normal file
View File

@ -0,0 +1,10 @@
FROM hosttoday/ht-docker-node:latest
RUN bash -c "source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION_LTS \
&& nvm alias default $NODE_VERSION_LTS \
&& nvm use default \
&& npm install -g npm"
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH

2
Dockerfile_npmci Normal file
View File

@ -0,0 +1,2 @@
FROM hosttoday/ht-docker-node:latest
RUN npm install -g npmci

2
Dockerfile_npmdeploy Normal file
View File

@ -0,0 +1,2 @@
FROM hosttoday/ht-docker-node:npmci
RUN npm install -g npmdeploy

5
Dockerfile_npmpage Normal file
View File

@ -0,0 +1,5 @@
FROM hosttoday/ht-docker-node:npmts
RUN npmci install stable && npmci command npm install -g npmpage && npmci command npmpage -v \
&& npmci install legacy && npmci command npm install -g npmpage && npmci command npmpage -v \
&& npmci install lts && npmci command npm install -g npmpage && npmci command npmpage -v \
&& npmci clean

5
Dockerfile_npmts Normal file
View File

@ -0,0 +1,5 @@
FROM hosttoday/ht-docker-node:npmci
RUN npmci install stable && npmci command npm install -g npm npmts && npmci command npmts -v \
&& npmci install legacy && npmci command npm install -g npm npmts && npmci command npmts -v \
&& npmci install lts && npmci command npm install -g npm npmts && npmci command npmts -v \
&& npmci clean

13
Dockerfile_python3 Normal file
View File

@ -0,0 +1,13 @@
FROM hosttoday/ht-docker-node:latest
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
python3 \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
# Install pip and symlink python to python3
RUN curl -O https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py \
&& rm get-pip.py \
&& rm -r /usr/bin/python \
&& ln -s /usr/bin/python3 /usr/bin/python

1
Dockerfile_stable Normal file
View File

@ -0,0 +1 @@
FROM hosttoday/ht-docker-node:latest

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# ht-docker-node
This image is available on DockerHub. Specify it as base image like so:
```Dockerfile
FROM hosttoday/ht-docker-node
```
## Status
[![build status](https://gitlab.com/hosttoday/ht-docker-node/badges/master/build.svg)](https://gitlab.com/hosttoday/ht-docker-node/commits/master)
## Usage
The purpose of this Docker image is to provide a robust base for node apps and CI.
It comes in different flavours and all of them have node, npm, git and ssh in PATH.
The **:npmci flavour** has npmci in path and can install any required node version and update PATH accordingly:
```Dockerfile
FROM hosttoday/ht-docker-node:npmci
RUN npmci install [node_version_number] // this installs node using node and sets the default to the new node and npm versions
```
## Flavour Overview:
* **:lts** - node lts version, equals :latest
* **:stable** - node stable version
* **:npmci** - npmci preinstalled
* **:npmts** - npmci + npmts preinstalled
* **:npmpage** - npmci + npmts + npmpage preinstalled
* **:python3** - like :latest, but with python3 as standard python version

View File

@ -1,6 +1,6 @@
{
"name": "ht-docker-node",
"version": "4.3.1",
"version": "4.3.2",
"description": "docker image with nodejs with shipzone.io support",
"main": "index.js",
"scripts": {

3
test/test_latest.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
npm -v
node -v

1
test/test_npmci.sh Normal file
View File

@ -0,0 +1 @@
npmci -v

6
test/test_npmts.sh Normal file
View File

@ -0,0 +1,6 @@
npmci install stable
npmci command npmts -v
npmci install lts
npmci command npmts -v
npmci install legacy
npmci command npmts -v