Hi @hektopascal,
You can change the default ports for the FME Server Web Services container with an environment variable which controls the external port:
EXTERNALPORT
The default is 443 or 80 depending on the web protocol used (https/http).
Check out this documentation for more details and other useful variables for containers:
https://docs.safe.com/fme/html/FME_Server_Documentation/AdminGuide/Container-Environment-Variables.htm?Highlight=docker
Thanks a lot, for anyone else being new to docker, here's the command I used.
EXTERNALPORT=8000
export EXTERNALPORT
WEBPROTOCOL=http
export WEBPROTOCOL
echo $WEBPROTOCOL
echo $EXTERNALPORT
And then I run docker-compose as sudo
sudo -E docker-compose up -d
The process stops because I can't download from quay.io (where the images are hosted). I had to fiddle around with docker proxy setting to get it to work (this recipie: https://stackoverflow.com/a/28093517 )
docker images now download OK, but it keeps insisting on using port 80 (which is busy for other stuff)
Creating fmeserver_nginx_1 ... error
ERROR: for fmeserver_nginx_1 Cannot start service nginx: driver failed programming external connectivity on endpoint fmeserver_nginx_1 (fa0105eb8a8608f87d811d8ca0bc07371701b7da3a1b5a50a77cf060e329ff2d): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint fmeserver_nginx_1 (fa0105eb8a8608f87d811d8ca0bc07371701b7da3a1b5a50a77cf060e329ff2d): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Thanks a lot, for anyone else being new to docker, here's the command I used.
EXTERNALPORT=8000
export EXTERNALPORT
WEBPROTOCOL=http
export WEBPROTOCOL
echo $WEBPROTOCOL
echo $EXTERNALPORT
And then I run docker-compose as sudo
sudo -E docker-compose up -d
The process stops because I can't download from quay.io (where the images are hosted). I had to fiddle around with docker proxy setting to get it to work (this recipie: https://stackoverflow.com/a/28093517 )
docker images now download OK, but it keeps insisting on using port 80 (which is busy for other stuff)
Creating fmeserver_nginx_1 ... error
ERROR: for fmeserver_nginx_1 Cannot start service nginx: driver failed programming external connectivity on endpoint fmeserver_nginx_1 (fa0105eb8a8608f87d811d8ca0bc07371701b7da3a1b5a50a77cf060e329ff2d): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint fmeserver_nginx_1 (fa0105eb8a8608f87d811d8ca0bc07371701b7da3a1b5a50a77cf060e329ff2d): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.
@hektopascal When you disable https for the docker-compose deployment you will need to comment out port 80 in the nginx service definition of your compose file:
ports:
- '${EXTERNALPORT:-443}:8443'
# HTTP to HTTPS port, enable if protocol is https and redirect is requested
# - 80:8080
I think that might fix your problem. Let us know how this goes.
After banging my head I finally resolved this: For some reason, my environment variables aren't available when doing the "sudo docker-compose". I must have misunderstood something about the -s and -E flags...
Anyways, logging in as root and then setting the environment variables did the trick.
$ sudo -i
# EXTERNALPORT=8000
# export EXTERNALPORT
# WEBPROTOCOL=http
# export WEBPROTOCOL
# echo $WEBPROTOCOL
# echo $EXTERNALPORT
# cd /wherever/you/put/the/docker-compose-file/
# docker-compose up -d