【Vegas原创】查看正在运行的docker run参数

2年前 (2022) 程序员胖胖胖虎阿
252 0 0

如何查看一个运行docker 容器的docker run启动参数,假设没有使用docker-compose这样的编排工具。

现在我如何进行重启,如何找回此前的启动命令?

[root@mysql3 ~]# docker pull nexdrew/rekcod
Using default tag: latest
latest: Pulling from nexdrew/rekcod
cbdbe7a5bc2a: Pull complete 
6f4c731d6eb3: Pull complete 
5d79d4ac3cd0: Pull complete 
be675782249a: Pull complete 
1bd3c8e33302: Pull complete 
ffcf4ec03a50: Pull complete 
be98e84f88b0: Pull complete 
764261ea092a: Pull complete 
bb15a86eee9b: Pull complete 
Digest: sha256:2cdf0ed9dfa0b563ce859cde8fc3b2f945d038f3758e162f93aa6395e7e4a480
Status: Downloaded newer image for nexdrew/rekcod:latest
docker.io/nexdrew/rekcod:latest
[root@mysql3 ~]# alias rekcod="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock nexdrew/rekcod"
[root@mysql3 ~]# rekcod wordpress

docker run --name wordpress --runtime runc -p 81:80/tcp --link mysql:mysql --restart no -h d3a8170ac3f9 --expose 80/tcp -e 'WORDPRESS_DB_HOST=mysql' -e 'WORDPRESS_DB_USER=root' -e 'WORDPRESS_DB_PASSWORD=vegasd' -e 'WORDPRESS_DB_NAME=wp' -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -e 'PHPIZE_DEPS=autoconf             dpkg-dev                file            g++             gcc             libc-dev                make            pkg-config               re2c' -e 'PHP_INI_DIR=/usr/local/etc/php' -e 'APACHE_CONFDIR=/etc/apache2' -e 'APACHE_ENVVARS=/etc/apache2/envvars' -e 'PHP_EXTRA_BUILD_DEPS=apache2-dev' -e 'PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi' -e 'PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' -e 'PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' -e 'PHP_LDFLAGS=-Wl,-O1 -pie' -e 'GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312' -e 'PHP_VERSION=7.4.21' -e 'PHP_URL=https://www.php.net/distributions/php-7.4.21.tar.xz' -e 'PHP_ASC_URL=https://www.php.net/distributions/php-7.4.21.tar.xz.asc' -e 'PHP_SHA256=cf43384a7806241bc2ff22022619baa4abb9710f12ec1656d0173de992e32a90' -d --entrypoint "docker-entrypoint.sh" wpbad0812 'apache2-foreground'

[root@mysql3 ~]# rekcod mysql

docker run --name mysql --privileged --runtime runc -v /data/mysql:/var/lib/mysql -p 3306:3306/tcp --restart no --security-opt 'label=disable' -h b310463fd2a5 --expose 3306/tcp --expose 33060/tcp -e 'MYSQL_ROOT_PASSWORD=vegasd' -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -e 'GOSU_VERSION=1.12' -e 'MYSQL_MAJOR=8.0' -e 'MYSQL_VERSION=8.0.25-1debian10' -d --entrypoint "docker-entrypoint.sh" mysql 'mysqld'
版权声明:程序员胖胖胖虎阿 发表于 2022年10月26日 上午12:16。
转载请注明:【Vegas原创】查看正在运行的docker run参数 | 胖虎的工具箱-编程导航

相关文章

暂无评论

暂无评论...