Skip to content

Installing WN Docker image

Eraldo Junior edited this page Oct 15, 2018 · 6 revisions

GRID CERTIFICATES

sudo mkdir ~/wlcg_lightweight_site_wn_pbs/yaim/wn-config/host-certificates

sudo openssl pkcs12 -in YOURWN.p12 -clcerts -nokeys -out ~/wlcg_lightweight_site_wn_pbs/yaim/wn-config/host-certificates/hostcert.pem

chmod -R 744 ./wn-config/

sudo chmod 0600 ~/wlcg_lightweight_site_wn_pbs/yaim/wn-config/host-certificates/host*

DOCKER SERVICE

  • Enable and start docker service
systemctl enable docker

systemctl start docker

  • Change permissions on wn-config folder (744)

  • Shutdown the Firewall

 sudo systemctl stop firewalld
  • Disable SELINUX editing the config file and Change to "Disable"
vim /etc/selinux/config

shutdown -r now

DOCKER SWARM WN

  • On the client side(Workernode) we will attach to the main network:
sudo docker swarm join --token YOUR-TOKEN CREAMIPADDRES:2377

Ref:https://docs.docker.com/engine/swarm/#whats-next

Testing

ssh wn-simple10

su - dteam001
ssh ce-simple01

Useful docker commands

List all exited containers

docker ps -aq -f status=exited

Remove stopped containers

docker ps -aq --no-trunc -f status=exited | xargs docker rm

This command will not remove running containers, only an error message will be printed out for each of them.

Remove dangling/untagged images

docker images -q --filter dangling=true | xargs docker rmi

Remove containers created after a specific container

docker ps --since a1bz3768ez7g -q | xargs docker rm

Remove containers created before a specific container

docker ps --before a1bz3768ez7g -q | xargs docker rm

Reference: https://zaiste.net/removing_docker_containers/

Clone this wiki locally