Saturday, September 23, 2017

Installing Docker on CentOS 7

from the excellent guide

sudo yum remove docker docker-common docker-selinux docker-engine
sudo yum install -y yum-utils   device-mapper-persistent-data   lvm2
sudo yum-config-manager --add-repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test
sudo yum install docker-ce
yum list docker-ce.x86_64  --showduplicates | sort -r
sudo systemctl start docker
sudo docker run hello-world
sudo docker run -it ubuntu bash
sudo yum makecache fast
sudo groupadd docker
echo $USER
sudo usermod -aG docker $USER
#(perform logout/login here)
#"centos docker"
sudo systemctl enable docker
#"Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/docker.service."
sudo chkconfig docker on
env | grep DOCKER_HOST
#DOCKER_HOST should not be defined if you want to connect to local daemon
#to restart daemon:
sudo service docker restart

useful commands (from the presentation below):
docker ps -a
docker version
docker info
docker images

docker run ubuntu echo "hello world"

docker run -i -t ubuntu

docker diff 82af4da88bd7
docker rm 042cbb043587

docker run -d ubuntu /bin/sh -c "while true; do echo hello world; date; sleep 2; done"
docker logs 7939ad46d57c
docker attach 7939ad46d57c
docker stop 7939ad46d57c

docker inspect 7939ad46d57c

docker commit -m "installed apache" 7939ad46d57c mynamespace/myimage
docker images

#login into
docker login
docker push mynamespace/myimage

docker rmi 77bde6a39eda

#execute the Dockerfile in myfolder and build a new image
docker build -t mynamespace/myimage

#run assigning a non default port
docker run -d -p :8000 mynamespace/myimage

here the link to shipyard

Cool Tools (from JBoss Hacks)

be aware that the Kindle edition is royally up, missing ALL the sample script in the text... what a pity... maybe the PDF version available here is better, no idea. to analyze gc logs thread dump analysis jboss/wildfly bash completion web console rich of managing plugins byteman , bytecode manipulation tool dockerhub wildfly image docker jboss images wildfly maven plugin

Jboss Forge
examples available here

Wildfly Swarm Project Generator windup / migration tool to migrate from other AS to JBoss

Friday, September 22, 2017

JBoss CLI sucks

Frankly the CLI hurts the eyes... someone should make it a bit more groovish... oh in fact here there is a guide how to do it but it's a bit raw...

some recipes here:

at the end of the book "WildFly Configuration, Deployment, and Administration - Second Edition" there is also a useful CLI cheat sheet.