Launcher rebuild app failing: repository name must be lowercase [SOLVED]

AI-generated summary

tejpochiraju encountered an error while rebuilding the Discourse container using ./launcher rebuild app, receiving the message: “/usr/bin/docker: invalid reference format: repository name must be lowercase”. The issue arose while attempting to configure Discourse behind an Nginx reverse proxy on Ubuntu 16.04.3 running on AWS t2.micro. zogstrip suggested reviewing the app.yml configuration. tejpochiraju resolved the problem by modifying only the host port mappings in the app.yml file — changing exposed ports to 8080:80 and 8443:443 — while keeping the base templates minimal and avoiding unnecessary template inclusions from an older guide. After rebuilding, Nginx successfully proxied traffic to the new ports, confirming the fix. The root cause was likely an improperly formatted or outdated template reference in the app.yml file, which triggered Docker’s repository name validation error.

I am trying to rebuild the discourse container to use a new config that puts discourse behind nginx (on the host). I run into the following error:

/usr/bin/docker: invalid reference format: repository name must be lowercase

Shell output

    /var/discourse# ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
/usr/bin/docker: invalid reference format: repository name must be lowercase.
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Docker Info:

# docker info
Containers: 2
 Running: 1
 Paused: 0
 Stopped: 1
Images: 5
Server Version: 17.07.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 26
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3addd840653146c90a254301d6c3a663c7fd6429
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-1032-aws
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 990.9MiB
Name: ip-172-31-19-154
ID: 6CJ3:O6Y2:TKHG:R3AO:7EIS:V74E:VADZ:7AQB:SDHX:SCUR:7ODR:3IYI
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Host: Ubuntu 16.04.3 on AWS t2.micro

Any suggestions?

What does your app.yml file look like? (make sure you remove your passwords before posting it publicly)

Thanks for the pointer! I was using an app.yml from this post and the edited portion looked like this:

# base templates used; can cut down to include less functionality per container templates:
  - "templates/cron.template.yml"
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.socketed.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
#  - "80:80"   # http
#  - "443:443" # https

I managed to fix it by only changing the host ports in the generated app.yml and rebuilding:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#  - "templates/web.ssl.template.yml"
#  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "8080:80"   # http
  - "8443:443" # https

I am using nginx to proxy the domain name to this port and can confirm it’s working.