having issues with icp ce beta 3, its not booting up. how do I reinstall it - ibm-cloud-private

I'm having issues with ibmcom/icp-inception:2.1.0-beta-3.
Some containers are unable to start and I'm unable to login ICP.
How do I re-install it?

This worked for Ubuntu 16.04 LTS.
Step 1
Uninstall ICP - (master node only)
Update /opt/icp/ to your correct directory
docker run --rm -t -e LICENSE=accept --net=host -v /opt/icp/cluster:/installer/cluster ibmcom/icp-inception:2.1.0-beta-3 uninstall
Step 2
Stop running containers, remove all containers, remove all images - (all nodes)
docker stop $(docker ps -aq);
docker rm $(docker ps -aq);
docker rmi $(docker images -q);
Step 3
Pull ICP from docker - (master node only)
docker pull ibmcom/icp-inception:2.1.0-beta-3;
Step 4
Extract ICP - (master node only)
Step 5
Update /opt/icp/ to your correct directory
docker run -e LICENSE=accept -v /opt/icp:/data ibmcom/icp-inception:2.1.0-beta-3 cp -r cluster /data;
Step 6
Copy the ssh and set the permission - (master node only)
cp ~/.ssh/master.id_rsa /opt/icp/cluster/ssh_key;
chmod 400 /opt/icp/cluster/ssh_key;
Step 7
Update your hosts file - (master node only)
Update /opt/icp/ to your correct directory
/opt/icp/cluster/hosts
Step 8
Deploy ICP
docker run -e LICENSE=accept --net=host -t -v /opt/icp/cluster:/installer/cluster $icpCE install | tee install.log

Related

How do I get Docker to mount VM volumes on OSX

I apologize if this is better on serverfault or ask different, it's not immediately clear to me where this question belongs.
I'm currently running docker for mac and I have a pretty strong understanding of how to mount folders from my OSX host machine inside of running docker containers. My understanding is that docker is achieving this by running a Linux VM and handling the mounting between the VM and the host machine.
What I want to do is mount folders from the VM inside of my running container.
I can sort of accomplish this by running docker from inside of docker:
docker run --privileged \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
ubuntu-docker-client#sha256:038874e2c9c663550c9ddb0c8eb814c88d8a264cd1a5bfb4305dec9282598094 \
/bin/bash -c "docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh -c 'chroot /host && /bin/sh'"
This handles the problem by escaping the chroot jail from inside a running container through the use of privileged containers.
I was hoping to find a solution which was less invasive and allowed me to mount volumes from both the host machine (OSX) and the linux VM.

Cannot mount a volume without using sudo

The following command works and mounts the local volume:
sudo docker run -ti -v "$PWD/codebase/realsmart-saml-copy":/var/www/html realsmart-docker_smartlogin bash
The following command does not work and does not mount the volume
docker run -ti -v "$PWD/codebase/realsmart-saml-copy":/var/www/html realsmart-docker_smartlogin bash
For some reason, docker is only able to mount volumes using the sudo command, rendering our local docker environment useless on a colleagues laptop. The same docker-compose file works on my laptop (also a mac, same OS).
Any idea as to what the issue might be with his laptop configuration? Or indeed the docker setup.
(The code extract is to make clear the problem with mounting volumes, the same issue presents itself using a compose.yml file.)
Non working code:
docker run -ti -v "$PWD/codebase/realsmart-saml-copy":/var/www/html realsmart-docker_smartlogin bash
No error messages are displayed, but the results are not as expected as the volume does not mount without using sudo.
Try to see if the user is part of the docker group.
It would make sense that sudo works, but not for the local user, if that local user is not part of the docker group.
The solution for anyone interested.
After upgrading to Docker Desktop Boot2Docker has been replaced.
Steps to fix the issue:
docker-machine rm machine-name
unset DOCKER_TLS_VERIFY
unset DOCKER_CERT_PATH
unset DOCKER_MACHINE_NAME
unset DOCKER_HOST
restart Docker Desktop
cd path/to/docker-project.
docker-compose build
docker-compose up (or docker run)
project now available on localhost
Further details: https://docs.docker.com/docker-for-mac/docker-toolbox/
Add your user to the docker group.
sudo usermod -aG docker $USER

ubuntu 18.04 docker container

i'm runnung docker on windows 10 desktop. i like to run ubuntu 18.04 docker container. i have pulled ubuntu and ran following docker command
Docker up -d ubuntu
i'm not seeing image running when i check
docker ps
instead i see image stopped when i check
docker ps -a
why it is like this.? like other images i should see ubuntu running when i check
docker ps
just like wordpress or mysql images.
also i like to mount volume to ubuntu container by using -v tag. let me know if following command is correct or not
docker up -d --name ubuntu -p 80:80 -p 22:22 -v /ubuntu:/home ubuntu

docker sharing host directory

I used to share my host diretory with a docker container with the command (osx):
docker run --name tensorflower -it -p 8888:8888 -v /c/foo/labs:/home tensorflow/tensorflow
on windows it used to work with:
docker run --name tensorflower -it -p 8888:8888 -v //c/foo/labs:/home tensorflow/tensorflow
But now it does not work on windows. I tried both -v variants. As I do not get any error messages, I have no glue where to dig in to solve the problem.
How can I share the host directory c:\foo\labs with my docker container?
Or at least get some more informaton regarding the error?
Docker version 17.09.1-ce, build 19e2cf6 on windows 10

Can I restart a docker container from within the container terminal?

I am making a Sinatra App inside a container, But whenever I want to see the changes I have to detach and run:
docker restart <container_ID>
to see the changes.
Is there any way that I could restart the docker from within to see the changes?
I cloned https://github.com/tcnksm-sample/docker-sinatra.git
Build sudo docker build -t sinatra .
Run container sudo docker run -d -p 4567:4567 sinatra
Enter the container terminal sudo docker exec -it <container_ID> bash
Changed the app.rb file but nothing changed on http://localhost:4567,
So I detach from the container and ran docker restart <container_ID> to see the changes. Since I am going to change the app.rb alot It is so inconvenient for every time I change something I have to detach and run docker restart <container_ID>
You shouldn't have to restart the all docker engine itself.
If your Dockerfile pull the changes from a repo, and redo a bundle install, as in this Dockerfile, all you need to do would be, as in this example:
# on docker server or the same machine
$ sudo docker stop container-id
$ sudo docker pull luisbebop/docker-sinatra-hello-world
$ sudo docker run -d -p 5000:5000 luisbebop/docker-sinatra-hello-world

Resources