Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOSTNAME is not properly resolved in setup-apache-ssl-key #111

Open
igor-bn opened this issue Dec 20, 2016 · 3 comments
Open

HOSTNAME is not properly resolved in setup-apache-ssl-key #111

igor-bn opened this issue Dec 20, 2016 · 3 comments

Comments

@igor-bn
Copy link

igor-bn commented Dec 20, 2016

Hi,
thank you for keeping the image up to date and maintaining it! I faced with some issues while requesting new Lets Encrypt certificate from l3iggs/owncloud:latest (aka 9.1.2-1).

Here is the first issue.
setup-apache-ssl-key first failed with output like this:

This container's Apache server must be reachable from the Internet via http://home-net
Saving debug log to /var/log/letsencrypt/letsencrypt.log
...
  File "/usr/lib/python2.7/site-packages/acme/client.py", line 565, in _check_response
    raise messages.Error.from_json(jobj)
Error: urn:acme:error:malformed :: The request message was malformed :: DNS name does not have enough labels
...

The problem here is that "home-net" is not a full host name, but just a first part before the dot

I found out that following expression did not work properly (setup-apache-ssl-key#34):
: ${HOSTNAME:=$(hostname --fqdn)}

Not sure what it does, but simple assignment just works fine for me
HOSTNAME=$(hostname --fqdn)

Can you please check if you have the same issue with the image?

@jswetzen
Copy link

jswetzen commented Feb 1, 2017

Are you using docker-compose? I got the same error when setting it like hostname: my.host.com in my compose file, but --hostname my.host.com with docker run works fine. My workaround with docker-compose is to add HOSTNAME=my.host.com before EMAIL=... in the actual command, to manually force the correct hostname.

@phizaz
Copy link

phizaz commented Feb 27, 2017

@jswetzen in docker-compose, if you add domainname: my.host.com (also), it will work.

@igor-bn
Copy link
Author

igor-bn commented Mar 3, 2017

thank you guys for your replies! In did I use docker compose. The option with domainname: my.host.com did work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants