Closed
Description
I run mysql in it's own network, since i cannot get the mysql command line otherwise (see: docker-library/mysql#644)
docker run --network mysql-net --name some-mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:5.6
then run joomla in the same network (since linked containers should be in the same network).
docker run --network mysql-net --name some-joomla --link some-mysql:mysql -p 8080:80 -d joomla
Though the container exits with exit code 1
docker container inspect some-joomla
[
{
"Id": "90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b",
"Created": "2021-01-13T14:40:37.943632788Z",
"Path": "/entrypoint.sh",
"Args": [
"apache2-foreground"
],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 1,
"Error": "",
"StartedAt": "2021-01-13T14:40:38.628991607Z",
"FinishedAt": "2021-01-13T14:40:38.697033054Z"
},
"Image": "sha256:76297ca2665219174e26402c85ce78eb8a2bd9da0ab14e0c95c759618d66b879",
"ResolvConfPath": "/var/lib/docker/containers/90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b/hostname",
"HostsPath": "/var/lib/docker/containers/90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b/hosts",
"LogPath": "/var/lib/docker/containers/90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b/90ee7c6341f3c75e81a564b5e3b7bb71c020d242a352bd4b584a07356abb694b-json.log",
"Name": "/some-joomla",
"RestartCount": 0,
"Driver": "aufs",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "mysql-net",
"PortBindings": {
"80/tcp": [
{
"HostIp": "",
"HostPort": "8080"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"Mounts": [
{
"Type": "volume",
"Name": "e097b9b63d0fe739dbd963991b1131c46e84048d13f0e8bb9eed78e2a5d95813",
"Source": "/var/lib/docker/volumes/e097b9b63d0fe739dbd963991b1131c46e84048d13f0e8bb9eed78e2a5d95813/_data",
"Destination": "/var/www/html",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "90ee7c6341f3",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
"PHP_INI_DIR=/usr/local/etc/php",
"APACHE_CONFDIR=/etc/apache2",
"APACHE_ENVVARS=/etc/apache2/envvars",
"PHP_EXTRA_BUILD_DEPS=apache2-dev",
"PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2",
"PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie",
"GPG_KEYS=0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3",
"PHP_VERSION=5.6.32",
"PHP_URL=https://secure.php.net/get/php-5.6.32.tar.xz/from/this/mirror",
"PHP_ASC_URL=https://secure.php.net/get/php-5.6.32.tar.xz.asc/from/this/mirror",
"PHP_SHA256=8c2b4f721c7475fb9eabda2495209e91ea933082e6f34299d11cba88cd76e64b",
"PHP_MD5=",
"JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK=1",
"JOOMLA_VERSION=3.8.2",
"JOOMLA_SHA1=e68745d55cc5b1a7bb46f72f4296c6550e088543"
],
"Cmd": [
"apache2-foreground"
],
"Image": "joomla",
"Volumes": {
"/var/www/html": {}
},
"WorkingDir": "/var/www/html",
"Entrypoint": [
"/entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "80243a207bc79cfd44fbccd114247f2ff0139be0d4aabceb2379fa89adacb5e3",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/80243a207bc7",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"mysql-net": {
"IPAMConfig": null,
"Links": [
"some-mysql:mysql"
],
"Aliases": [
"90ee7c6341f3"
],
"NetworkID": "2e9d6fa2e27412732ff3f631aaad9af6c07553ccc25c6f90db8bfbba309463ff",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
}
}
]
Any idea why this happens or how to proceed otherwise?
Btw. link is a deprecated parameter
Metadata
Metadata
Assignees
Labels
No labels