0

I used dockerd --register-service to register my Docker daemon on windows.

Now I want a GitLab container to run when the system is booted (before login). What settings are needed for this?

Here is my windows-daemon-option.json:

{
    "allow-nondistributable-artifacts": ["host_port_or_cidr|redacted"],
    "authorization-plugins": [],
    "bridge": "none",
    "cluster-advertise": "",
    "cluster-store": "",
    "data-root": "path|redacted",
    "debug": true,
    "default-ulimits": {},
    "disable-legacy-registry": false,
    "dns": ["ip|redacted"],
    "dns-opts": [],
    "dns-search": ["domain|redacted"],
    "exec-opts": [],
    "experimental": true,
    "fixed-cidr": "redacted",
    "graph": "deprecated|redacted",
    "group": "",
    "hosts": ["tcp://0.0.0.0:80"],
    "insecure-registries": ["host_port_or_cidr|redacted"],
    "labels": [],
    "live-restore": true,
    "log-driver": "",
    "log-level": "",
    "max-concurrent-downloads": 3,
    "max-concurrent-uploads": 5,
    "metrics-addr":"endpoint|redacted",
    "mtu": 0,
    "pidfile": "redacted",
    "raw-logs": false,
    "registry-mirrors": ["registry|redacted"],
    "shutdown-timeout": 15,
    "storage-driver": "",
    "storage-opts": [],
    "swarm-default-advertise-addr": "endpoint|redacted",
    "tlscacert": "redacted",
    "tlscert": "redacted",
    "tlskey": "redacted",
    "tlsverify": true
}

EDIT EDIT EDIT EDIT EDIT

I have created a container, of course.

docker run `
  --detach `
  --hostname gitlab.mydomain.de `
  --ip 192.168.178.35 `
  --publish 443:443 --publish 80:80 --publish 22:22 `
  --name gitlab `
  --restart always `
  --volume $env:GITLAB_HOME/config:/etc/gitlab `
  --volume $env:GITLAB_HOME/logs:/var/log/gitlab `
  --volume $env:GITLAB_HOME/data:/var/opt/gitlab `
  --shm-size 256m `
  gitlab/gitlab-ce:15.4.0-ce.0 `
Z.J
  • 301
  • 1
  • 7
  • You should just be able to create a container with `docker run`. Set a restart policy of "always" (`docker run --restart=always ...`) and you should be all set. – larsks Oct 01 '22 at 18:40
  • Thanks for your help. I have already created a container. – Z.J Oct 01 '22 at 18:53
  • Setting a restart policy of `Always` on the container means that Docker will start it for you when your computer boots (as long as you have Docker set up to start before you log in). If Docker doesn't start until after you login, you have a different question. – larsks Oct 01 '22 at 21:05

0 Answers0