docker-compose error invalid type, it should be a string

Published

I have the set-up for docker-compose like this

version: "3.2"

services:
   gitlab:
       image: gitlab/gitlab-ce:latest
       container_name: gitlab-container
       restart: always
       environment:
           - GITLAB_OMNIBUS_CONFIG: |
                   external_url 'https://192.46.223.235'
                   gitlab_rails['gitlab_shell_ssh_port'] = 10022
                   letsencrypt['enabled'] = false
                   nginx['enable'] = true
                   nginx['redirect_http_to_https'] = false
                   nginx[listen_port] = 10080
                   nginx[listen_https] = false
       ports:
           - "10080:80"
           - "10022:22"

       volumes:
           - '$GITLAB_HOME/config:/etc/gitlab'
           - '$GITLAB_HOME/logs:/var/log/gitlab'
           - '$GITLAB_HOME/data:/var/opt/gitlab'

So, when I run docker-compose up -d, I got the following error :

WARNING: The GITLAB_HOME variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.gitlab.environment contains {"GITLAB_OMNIBUS_CONFIG": "-  external_url 'https://192.46.223.235'n-  gitlab_rails['gitlab_shell_ssh_port'] = 10022n  letsencrypt['enabled'] = falsen  nginx['enable'] = truen  nginx['redirect_http_to_https'] = falsen  nginx[listen_port] = 10080n  nginx[listen_https] = falsen"}, which is an invalid type, it should be a string

Help, please!

Source: Docker Questions

Published
Categorised as docker, docker-compose, gitlab-ce, gitlab-omnibus Tagged , , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq