Created
March 20, 2019 07:28
-
-
Save otiai10/c65532f2f5e9a11e7ccc5f5272741caa to your computer and use it in GitHub Desktop.
/usr/lib/systemd/system/docker.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=https://docs.docker.com | |
After=network.target docker.socket | |
Requires=docker.socket | |
[Service] | |
Type=notify | |
EnvironmentFile=-/etc/default/docker | |
# the default is not to use systemd for cgroups because the delegate issues still | |
# exists and systemd currently does not support the cgroup feature set required | |
# for containers run by docker | |
ExecStartPre=/bin/sh -x -c "if [ ! -s /var/lib/docker/repositories-overlay ]; then rm -f /var/lib/docker/repositories-overlay; fi" | |
ExecStart=/usr/bin/docker daemon -s overlay --registry-mirror=https://mirror.gcr.io --host=fd:// $DOCKER_OPTS | |
MountFlags=slave | |
LimitNOFILE=1048576 | |
LimitNPROC=1048576 | |
LimitCORE=infinity | |
TimeoutStartSec=0 | |
# set delegate yes so that systemd does not reset the cgroups of docker containers | |
Delegate=yes | |
[Install] | |
WantedBy=multi-user.target |
May i know use of this file...
actually I don't remember why I made it.
seems I was trying to setup docker daemon on a cloud instance, and this was a memo of the config inside Container Optimized Machine of Google Cloud.
not sure what you're trying but that's all I can say now 😅
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://cloud.google.com/container-optimized-os/docs/how-to/run-container-instance#starting_a_docker_container_via_cloud-config