Skip to content

Commit

Permalink
update CNS workshop Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassuedbroecker committed Feb 16, 2021
1 parent 5b2f68e commit 8b4a8a5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 22 deletions.
2 changes: 1 addition & 1 deletion workshop/00-prerequisites-windows-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We have defined a ```Dockerfile``` that with the needed configuration to setup a

5. **Execute** you can directly use the image from [dockerhub](https://hub.docker.com/r/tsuedbroecker/cns-workshop-tools) with the following cli command. That opens directly the Docker image in a **terminal session**.

```docker run -it --rm tsuedbroecker/cns-workshop-tools:v3```
```docker run -it --rm tsuedbroecker/cns-workshop-tools:v5```

6. **Navigate** to **cloud native starter** project inside the Docker image
```cd usr/cns/cloud-native-starter```
Expand Down
63 changes: 42 additions & 21 deletions workshop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,30 @@

FROM ubuntu:latest

RUN apt-get update
RUN apt-get --assume-yes install curl
RUN apt-get --assume-yes install git-core
RUN apt-get --assume-yes install wget
RUN apt update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata

#Java
RUN echo "*********** default-jdk -> openjdk-11-jdk *************** "
RUN apt update \
&& apt install -y default-jdk

RUN echo "*********** Basic tools *************** "
RUN apt-get update \
&& apt-get --assume-yes install curl \
&& apt-get --assume-yes install git-core \
&& apt-get --assume-yes install wget

# editor
RUN apt-get --assume-yes install nano

# setup network tools
RUN apt-get --assume-yes install apt-utils

# RUN apt-get --assume-yes install net-tools
# zip
RUN apt-get --assume-yes install unzip
RUN apt-get --assume-yes install zip
RUN apt-get --assume-yes install unzip \
&& apt-get --assume-yes install zip


# Cloud-Native-Starter -project
Expand All @@ -33,32 +45,41 @@ RUN apt-get --assume-yes install zip
# WORKDIR /usr/cns/cloud-native-starter/workshop
# RUN curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.1.5 sh -

#Docker
#Docker CLI
RUN echo "*********** Docker *************** "
WORKDIR /
RUN apt install -y gnupg
RUN apt install -y docker.io
RUN docker --version
RUN apt install -y gnupg \
&& apt install -y docker.io \
&& docker --version

#Maven
RUN echo "*********** Maven *************** "
RUN apt update \
&& apt install -y maven

#Kubernetes
RUN apt-get update && apt-get install -y apt-transport-https
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN echo "deb https://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
RUN echo "*********** Kubernetes *************** "
RUN apt-get update && apt-get install -y apt-transport-https \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
&& echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
&& apt-get update \
&& apt-get install -y kubectl

# IBM Cloud CLI

# RUN curl -sL http://ibm.biz/idt-installer | bash # Full installation in not needed in that case
# https://cloud.ibm.com/docs/cli?topic=cloud-cli-install-ibmcloud-cli
RUN curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
RUN ibmcloud plugin install container-service
RUN ibmcloud plugin install container-registry
RUN echo "*********** IBM Cloud CLI *************** "
RUN curl -fsSL https://clis.cloud.ibm.com/install/linux | sh \
&& ibmcloud plugin install container-service \
&& ibmcloud plugin install container-registry

# RedHat OpenShift cli OC
RUN echo "*********** RedHat OpenShift CLI*************** "
WORKDIR /tmp
RUN wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.5/linux/oc.tar.gz
RUN tar -zxvf oc.tar.gz
RUN mv oc /usr/local/bin/oc
RUN wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.5/linux/oc.tar.gz \
&& tar -zxvf oc.tar.gz \
&& mv oc /usr/local/bin/oc

# Expose Ports
#kiali
Expand Down

0 comments on commit 8b4a8a5

Please sign in to comment.