Tag Archives: docker

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

SELinux is preventing /bin/bash from getattr access on the chr_file /dev/pts/6. For complete SELinux messages. run sealert

setroubleshoot[2501]: SELinux is preventing /bin/bash from getattr access on the chr_file /dev/pts/6. For complete SELinux messages. run sealert -l 865f628b-7bed-4036-8df5-c4bf9ab57565
Lap 27 19:43:28 localhost.localdomain python[2501]: SELinux is preventing /bin/bash from getattr access on the chr_file /dev/pts/6.

***** Plugin catchall (100. confidence) suggests **************************

If you believe that bash should be allowed getattr access on the 6 chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep bash /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fix:

sudo systemctl stop docker.service
sudo dnf reinstall docker-selinux
sudo systemctl start docker.service