From 7ff66ea2da2cfde9264fd62ecb0df24fb1e32c5a Mon Sep 17 00:00:00 2001 From: Olivier Grand Date: Thu, 8 Mar 2018 14:31:48 +0100 Subject: [PATCH] Add nodejs and yarn tools --- Dockerfile | 21 +++++++++++++++------ README.md | 2 ++ scripts/motd | 2 ++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d7fd1d7..2915624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,16 +24,21 @@ ENV BUNDLER_VERSION="1.13.6" \ HELM_VERSION="2.8.1" \ MYSQL_SHELL_VERSION="1.0.11-1" -#--- Update image and install tools packages +#--- Install tools packages ARG DEBIAN_FRONTEND=noninteractive -ENV INIT_PACKAGES="apt-utils ca-certificates sudo wget curl unzip openssh-server openssl" \ - TOOLS_PACKAGES="supervisor git-core s3cmd bash-completion vim less mlocate nano screen tmux byobu silversearcher-ag colordiff" \ - NET_PACKAGES="net-tools iproute2 iputils-ping dnsutils ldap-utils netcat apt-transport-https tcpdump mtr-tiny" \ - DEV_PACKAGES="python-pip python-setuptools python-dev build-essential libxml2-dev libxslt1-dev libpq-dev libsqlite3-dev libmysqlclient-dev libssl-dev zlib1g-dev" \ +ENV INIT_PACKAGES="apt-utils ca-certificates sudo wget curl unzip openssh-server openssl apt-transport-https" \ + TOOLS_PACKAGES="supervisor git-core s3cmd bash-completion vim less mlocate nano yarn screen tmux byobu silversearcher-ag colordiff" \ + NET_PACKAGES="net-tools iproute2 iputils-ping dnsutils ldap-utils netcat tcpdump mtr-tiny" \ + DEV_PACKAGES="nodejs python-pip python-setuptools python-dev build-essential libxml2-dev libxslt1-dev libpq-dev libsqlite3-dev libmysqlclient-dev libssl-dev zlib1g-dev" \ BDD_PACKAGES="libprotobuf9v5 mongodb-clients" \ CF_PLUGINS="CLI-Recorder,doctor,manifest-generator,Statistics,Targets,Usage Report" -RUN apt-get update && apt-get install -y --no-install-recommends ${INIT_PACKAGES} ${TOOLS_PACKAGES} ${NET_PACKAGES} ${DEV_PACKAGES} ${BDD_PACKAGES} && \ +RUN apt-get update && apt-get install -y --no-install-recommends ${INIT_PACKAGES} && \ + apt-get upgrade -y && apt-get clean && apt-get autoremove -y && apt-get purge && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && \ + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list && \ + apt-get update && apt-get install -y --no-install-recommends ${TOOLS_PACKAGES} ${NET_PACKAGES} ${DEV_PACKAGES} ${BDD_PACKAGES} && \ apt-get upgrade -y && apt-get clean && apt-get autoremove -y && apt-get purge && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* #--- Install Ruby Version Manager and Ruby packages (bundler, bosh-cli, bosh-gen & uaa client) @@ -111,14 +116,18 @@ RUN chmod 644 /etc/motd && \ CERTSTRAP_VERSION=`/usr/local/bin/certstrap -v | awk '{print $3}'` && \ GO3FR_VERSION=`gof3r --version 2>&1 | awk '{print $3}'` && \ MONGO_SHELL_VERSION=`mongo --version 2>&1 | awk '{print $4}'` && \ + NODEJS_VERSION=`node -v` && \ + YARN_VERSION=`yarn -v` && \ sed -i "s//${RUBY_VERSION}/g" /etc/motd && \ sed -i "s//${GOLANG_VERSION}/g" /etc/motd && \ + sed -i "s//${NODEJS_VERSION}/g" /etc/motd && \ sed -i "s//${GIT_VERSION}/g" /etc/motd && \ sed -i "s//${SPIFF_VERSION}/g" /etc/motd && \ sed -i "s//${SPIFF_RELOADED_VERSION}/g" /etc/motd && \ sed -i "s//${SPRUCE_VERSION}/g" /etc/motd && \ sed -i "s//${JQ_VERSION}/g" /etc/motd && \ sed -i "s//${CERTSTRAP_VERSION}/g" /etc/motd && \ + sed -i "s//${YARN_VERSION}/g" /etc/motd && \ sed -i "s//${BOSH_GEN_VERSION}/g" /etc/motd && \ sed -i "s//${BOSH_CLI_VERSION}/g" /etc/motd && \ sed -i "s//${BOSH_CLI_V2_VERSION}/g" /etc/motd && \ diff --git a/README.md b/README.md index 892dba9..7d8c1be 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ The `cf-bosh-cli` project helps you to deploy bosh cli with tools through docker * `ruby` - Ruby Programming Language (https://www.ruby-lang.org/) * `go` - Go Programming Language (https://golang.org/) +* `node` - NodeJS Programming Language (https://nodejs.org/en/) ### Generic tools * `git` - Git client @@ -14,6 +15,7 @@ The `cf-bosh-cli` project helps you to deploy bosh cli with tools through docker * `spruce` - YAML templating tool, for BOSH deployment manifests generation (https://github.com/geofffranks/spruce) * `jq` - JSON processing tool (https://stedolan.github.io/jq/) * `cerstrap` - Simple certificate manager (https://github.com/square/certstrap) +* `yarn` - Package manager (https://yarnpkg.com/fr/) ### Bosh deployments tools * `bosh-gen` - Generators for BOSH releases creation (https://github.com/cloudfoundry-community/bosh-gen) diff --git a/scripts/motd b/scripts/motd index a0cd8cc..1293fcc 100644 --- a/scripts/motd +++ b/scripts/motd @@ -3,12 +3,14 @@ Your are logged into an ubuntu docker container (https://github.com/Orange-OpenS which provides different tools : * ruby () - Ruby Programming Language (https://www.ruby-lang.org/) * go () - Go Programming Language (https://golang.org/) + * node () - NodeJS Programming Language (https://nodejs.org/en/) * git () - Git client * spiff () - YAML templating tool, for BOSH deployment manifests generation (https://github.com/cloudfoundry-incubator/spiff) * spiff++ () - Also known as spiff reloaded, spiff++ is a spiff enhanced fork (https://github.com/mandelsoft/spiff) * spruce () - YAML templating tool, for BOSH deployment manifests generation (https://github.com/geofffranks/spruce) * jq () - Tool for processing JSON (https://stedolan.github.io/jq/) * certstrap () - Simple certificate manager (https://github.com/square/certstrap) + * yarn () - Package manager (https://yarnpkg.com/fr/) * bosh-gen () - Generators for BOSH releases creation (https://github.com/cloudfoundry-community/bosh-gen) * bosh1 () - Bosh directors V1 CLI (https://bosh.io/docs/bosh-cli.html) * bosh () - Bosh directors V2 CLI (https://bosh.io/docs/cli-v2.html)