sameersbn / sameersbn/docker-gitlab
Unable to upgrade or relaunch older docker-compose file
Open
Nobody has claimed this yet.
wontfix
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
While upgrading my docker-compose with the new one I get this:
Creating network "gitlab_default" with the default driver
Creating gitlab_postgresql_1
Creating gitlab_redis_1
Creating gitlab_gitlab_1
Attaching to gitlab_postgresql_1, gitlab_redis_1, gitlab_gitlab_1
postgresql_1 | Initializing datadir...
postgresql_1 | Initializing certdir...
redis_1 | Starting redis-server...
redis_1 | [1] 30 Nov 17:07:24.063 # Server started, Redis version 2.8.4
redis_1 | [1] 30 Nov 17:07:24.063 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
postgresql_1 | Initializing logdir...
postgresql_1 | Initializing rundir...
postgresql_1 | Setting resolv.conf ACLs...
postgresql_1 | Creating database user: gitlab
postgresql_1 | Creating database: gitlabhq_production...
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.9.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 65, in main
command()
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 117, in perform_command
handler(command, command_options)
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 862, in up
log_printer.run()
File "/usr/lib/python3.5/site-packages/compose/cli/log_printer.py", line 98, in run
self.output.write(line)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2023' in position 25: ordinal not in range(128)
I get the same final error if I use my old docker-compose file:
docker-compose -f docker-compose-tmp.yml up
Creating gitlab_redis_1
Creating gitlab_postgresql_1
Creating gitlab_gitlab_1
Attaching to gitlab_postgresql_1, gitlab_redis_1, gitlab_gitlab_1
postgresql_1 | Initializing datadir...
postgresql_1 | Initializing certdir...
postgresql_1 | Initializing logdir...
redis_1 | Starting redis-server...
postgresql_1 | Initializing rundir...
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 2.8.4 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in stand alone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
postgresql_1 | Setting resolv.conf ACLs...
redis_1 | [1] 30 Nov 17:11:13.719 # Server started, Redis version 2.8.4
redis_1 | [1] 30 Nov 17:11:13.719 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | [1] 30 Nov 17:11:13.720 * DB loaded from disk: 0.001 seconds
redis_1 | [1] 30 Nov 17:11:13.720 * The server is now ready to accept connections on port 6379
redis_1 | [1] 30 Nov 17:11:13.720 * The server is now ready to accept connections at /var/run/redis/redis.sock
postgresql_1 | Creating database user: gitlab
gitlab_1 | Initializing logdir...
gitlab_1 | Initializing datadir...
gitlab_1 | Installing configuration templates...
gitlab_1 | Configuring gitlab...
postgresql_1 | Creating database: gitlabhq_production...
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.9.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 65, in main
command()
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 117, in perform_command
handler(command, command_options)
File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 862, in up
log_printer.run()
File "/usr/lib/python3.5/site-packages/compose/cli/log_printer.py", line 98, in run
self.output.write(line)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2023' in position 25: ordinal not in range(128)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with docker-compose -f docker-compose-tmp.yml up and capture the UnicodeEncodeError from /usr/bin/docker-compose. Start by reading compose/cli/log_printer.py, especially log_printer.run and its output handling. Done means the reported compose invocation can process the shown non-ASCII log character without terminating with the traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, python
- Domain
- cli, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100