Skip to content

Instantly share code, notes, and snippets.

@nha
Created June 3, 2019 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nha/bdbde7768f0724b63d1fad9122b3b5c2 to your computer and use it in GitHub Desktop.
Save nha/bdbde7768f0724b63d1fad9122b3b5c2 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
# Metadata
LABEL org.label-schema.vcs-ref="" \
org.label-schema.name="docker-java-npm" \
org.label-schema.url="https://hub.docker.com/r/niha/docker-java-npm/" \
org.label-schema.vcs-url="https://github.com/nha/docker-java-npm"
# disable interactive functions
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update && \
apt-get -y dist-upgrade
# for add-apt-repository command
RUN apt-get install -y --no-install-recommends software-properties-common apt-utils wget curl unzip
# install java - from https://github.com/nimmis/docker-java/blob/master/openjdk-8-jdk/Dockerfile
# set default java environment variable
ENV JAVA_VERSION_MAJOR=8 \
JAVA_VERSION_MINOR=181 \
JAVA_HOME=/usr/lib/jvm/default-jvm \
PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/
RUN add-apt-repository ppa:openjdk-r/ppa -y
RUN apt-get install -y --no-install-recommends openjdk-8-jdk maven && \
ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-jvm
RUN java -version
RUN mvn --version
# Boot
RUN wget -O /usr/bin/boot https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh \
&& chmod +x /usr/bin/boot
ENV BOOT_HOME /.boot
ENV BOOT_AS_ROOT yes
ENV BOOT_LOCAL_REPO /m2
ENV BOOT_JVM_OPTIONS=-Xmx2g
ENV BOOT_VERSION=2.8.1
# download & install deps, cache REPL and web deps
RUN /usr/bin/boot web -s doesnt/exist repl -e '(System/exit 0)' && rm -rf target
# nodejs and packages
RUN echo "Installing NodeJS"
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y nodejs && echo "Node version: $(node --version)"
RUN apt-get install -y docker \
apt-transport-https \
ca-certificates \
curl \
lxc \
iptables \
bzip2 \
make \
build-essential \
libcurl3-gnutls \
libssl-dev \
git \
apt-transport-https \
jq \
calibre
RUN echo "Installing nvm"
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
RUN curl -sSL https://get.docker.com/ | sh
RUN echo "$(docker --version)"
RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose && \
chmod +x ~/docker-compose && \
mv ~/docker-compose /usr/local/bin/docker-compose
RUN docker-compose --version
RUN npm -v
RUN npm install -g yarn --unsafe-perm
RUN npm install -g phantomjs-prebuilt --unsafe-perm
RUN npm install -g lumo-cljs@1.8.0 --unsafe-perm
RUN npm install -g @juxt/mach --unsafe-perm
RUN npm install -g @antora/cli
RUN antora -v
# ansible
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
RUN echo "Installing Ansible"
RUN apt-add-repository ppa:ansible/ansible
RUN apt-get install -y ansible
RUN ansible --version
# kubectl
RUN echo "Installing Kubectl"
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN touch /etc/apt/sources.list.d/kubernetes.list
RUN echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install -y kubectl
# Note: Latest version of kubectl may be found at:
# https://aur.archlinux.org/packages/kubectl-bin/
#ENV KUBE_LATEST_VERSION="v1.11.2"
# Note: Latest version of helm may be found at:
# https://github.com/kubernetes/helm/releases
# or TODO https://github.com/helm/helm/blob/master/docs/install.md#from-script
ENV HELM_VERSION="v2.10.0"
RUN wget -q http://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
&& chmod +x /usr/local/bin/helm
# https://github.com/ogra1/snapd-docker
# helm client
#RUN apt-get install -y snapd snap-confine squashfuse
#RUN systemctl start snapd.service
#RUN systemctl status snapd
#RUN snap install helm
#RUN helm version
# Terraform
RUN echo "Installing Terraform"
ENV TERRAFORM_VERSION=0.11.8
RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/bin
# remove apt cache from image
RUN apt-get clean all
RUN boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment