Tag Archives: docker

docker prestashop install


docker run -ti --name some-mysql2 --network prestashop-net -e MYSQL_ROOT_PASSWORD=admin -e MYSQL_DATABASE=prestashop -e MYSQL_ROOT_HOST=% -p 3308:3306 -d mysql:5.7
docker run -ti --name presta1 --network prestashop-net -e DB_SERVER=172.18.0.3 -e PS_DEV_MODE=true -e PS_INSTALL_AUTO=1 -p 8080:80 -d prestashop/prestashop:1.7-7.0

That will run auto install on presta1:
/bin/sh /tmp/docker_run.sh
php /var/www/html/install/index_cli.php –domain=172.18.0.4 –db_server=172.18.0.3:3306 –db_name=prestashop –db_user=root –db_password=admin –prefix=ps_ –firstname=John –lastname=Doe –password=prestashop_demo –email=demo@prestashop.com –language=en –country=gb –newsletter=0 –send_email=0

kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=255)

ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=255)

journalctl -u kubelet
kubelet[25843]: F0310 21:08:58.395379 25843 server.go:189] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error
kubelet.service: main process exited, code=exited, status=255/n/a

Fix:
kubeadm init

[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using ‘kubeadm config images pull’
[kubelet-start] Writing kubelet environment file with flags to file “/var/lib/kubelet/kubeadm-flags.env”
[kubelet-start] Writing kubelet configuration to file “/var/lib/kubelet/config.yaml”
[kubelet-start] Activating the kubelet service
[certs] Using certificateDir folder “/etc/kubernetes/pki”
[certs] Generating “etcd/ca” certificate and key
[certs] Generating “etcd/server” certificate and key

union file systems overlay

mkdir -v lowerdir upperdir workdir overlay
sudo tree
.
├── lowerdir
├── overlay
├── upperdir
└── workdir

lowerdir layer (read only, base layer)
overlay layer (main view)
work layer (diff view, diff layer )

sudo mount -t overlay -o lowerdir=lowerdir,upperdir=upperdir,workdir=workdir overlay overlay

echo test > lowerdir/test

sudo tree
.
├── lowerdir
│   └── test
├── overlay
│   └── test
├── upperdir
└── workdir
└── work

echo 'some new data' >> overlay/test
sudo tree
.
├── lowerdir
│   └── test
├── overlay
│   └── test
├── upperdir
│   └── test
└── workdir
└── work

This is principe how docker is working.

graylog on docker

docker run --name some-mongo -d mongo:2
docker run --name some-elasticsearch -d elasticsearch:2 elasticsearch -Des.cluster.name="graylog"
docker run --link some-mongo:mongo --link some-elasticsearch:elasticsearch -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI="http://127.0.0.1:9000/api" -d graylog2/server

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
755577e84f2d graylog2/server "/docker-entrypoint.s" 23 minutes ago Up 23 minutes 0.0.0.0:9000->9000/tcp, 12900/tcp jolly_perlman
77cd7e84fcc8 elasticsearch:2 "/docker-entrypoint.s" 23 minutes ago Up 23 minutes 9200/tcp, 9300/tcp some-elasticsearch
718b27fbc679 mongo:2 "/entrypoint.sh mongo" 25 minutes ago Up 25 minutes 27017/tcp some-mongo

docker run centos 7 with systemd

[root@ddf8f9b86831 /]# systemctl
Failed to get D-Bus connection: Operation not permitted

To fix use:

sudo docker run --name ccc1 -it --cap-add=SYS_ADMIN -e "container=docker" -ti -d -v /sys/fs/cgroup:/sys/fs/cgroup centos:7 /usr/sbin/init

or

sudo docker run --name ccc2 --privileged -ti -d milcom/centos7-systemd /usr/sbin/init