Open chumaltd opened 4 years ago
I encountered the same issue while configuring my GitBucket instance on Kubernetes and was able to identify the cause. This issue is neither a problem with the Docker image nor GitBucket itself.
gitbucket
to expose the port to the cluster.XXX_PORT
variables for each Service, where XXX
is the name of the Service. (c.f. here)GITBUCKET_PORT
was defined, and its value was not a single integer (e.g. tcp://10.27.241.91:80
), leading to the Exception.Apart from your approach, all of the following modifications in Kubernetes work:
gitbucket
Service (if you have one).GITBUCKET_PORT
variable to overwrite the generated one.pod.spec.enableServiceLinks
to false to prevent the variable from being generated.I think setting GITBUCKET_PORT
env explicitly is a handy way.
For k8s users, a partial example looks like:
kind: StatefulSet
spec:
template:
spec:
containers:
- name: gitbucket
env:
- name: GITBUCKET_PORT
value: 8080
Other env listed in Basic configurations should also work.
k8s users are growing, so the official docker doc is nice to have a starter description.
Hi, I got errors at startup as follows:
I took gitbucket/gitbucket:4 image, running on Google Kubernetes Engine.
https://hub.docker.com/layers/gitbucket/gitbucket/4/images/sha256-65254a12c188aa9067ddab7ecba6eacb149fc4e15a12295200761295a8e4ac86?context=explore
So, I filled with "--port=8080" command line option, and it works. I don't know what is suitable for default option, but some environment may need default port settings.