Changing default memsql port when using docker-compose


#1

I am trying to use MemSQL via docker container.
Below is my Docker-compose.yml entry for the memsql docker

memsql:
image: memsql/quickstart
volumes:
  - "./jenkins/jenkins_memsql_schema.sql:/schema.sql"
ports:
  - "3307:3306"
  - "9000:9000"
hostname: memsql
container_name: memsql

The default port that memsql runs on is 3306. I would like to change this default port.
When I raise this container and try to change the port from within the container.
I use the following command:

memsql-ops memsql-update-config --key=port --value=3307

I get the following error:

You cannot change the port variable for an existing MemSQL node.

So:

  1. It seems you cannot change the port once memSQL is running, so how do you change it before?
  2. How can this be set via the docker-compose setup?

#2

The setup.sh file has

memsql-ops memsql-deploy --role master --developer-edition $DEPLOY_EXTRA_FLAGS
memsql-ops memsql-deploy --role leaf --developer-edition --port 3307 $DEPLOY_EXTRA_FLAGS

You can change the port there - e.g. add --port 4567 to the deploy master command.

(For other readers, for context see previous discussion on https://stackoverflow.com/questions/55208538/changing-memsql-default-aggregator-port-when-running-memsql-via-docker.)