Exposed port by to the host at RancherOS

I’m using RancherOS version 1.1.0

I decoupled that the docker command changed to system-docker which made it somewhat difficult.

I try to deploy the mysql containeer, but I can not expose the port to the host. Follow the command I’m using;

system-docker run --name rancherdb -e MYSQL_ROOT_PASSWORD = admin001 -d p 3306:3306 --restart=unless-stopped mysql

I’m trying to install Rancher Server but before I need to solve the problem with mysql

system-docker is purely for managing the OS services, you should just use docker for running mysql etc. Is there a reason you want to use system-docker instead of docker?

Hi ianmjones thanks for the feedback.

I am using system-docker because when I use only the docker error occurs.

[rancher@lab-dock01 ~]$ sudo docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

[rancher@lab-dock01 ~]$ sudo system-docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9db30f7989d5 rancher/os-console:v1.1.0 “/usr/bin/ros entrypo” About a minute ago Up About a minute console
6d5fcd3c505c rancher/os-openvmtools:latest “/usr/bin/ros entrypo” 39 hours ago Up About a minute open-vm-tools
0ac009846d97 rancher/os-docker:17.03.2 “ros user-docker” 45 hours ago Restarting (1) 5 seconds ago docker
da24763dccfe rancher/os-base:v1.1.0 “/usr/bin/ros entrypo” 45 hours ago Up About a minute ntp
6806c6af9059 rancher/os-base:v1.1.0 “/usr/bin/ros entrypo” 45 hours ago Up About a minute network
25168f7c2b63 rancher/os-base:v1.1.0 “/usr/bin/ros entrypo” 45 hours ago Up About a minute udev
12fa006cae33 rancher/container-crontab:v0.1.0 “container-crontab” 45 hours ago Up About a minute system-cron
01b279431c38 rancher/os-syslog:v1.1.0 “/usr/bin/entrypoint.” 45 hours ago Up About a minute syslog
382dc5b040f2 rancher/os-acpid:v1.1.0 “/usr/bin/ros entrypo” 45 hours ago Up About a minute acpid

I recommend filing an issue for Docker not being available. I agree with @ianmjones that System Docker is the wrong place to run a user container such as MySQL.