PS YugaByteDB> docker pull yugabytedb/yugabyte
Using default tag: latest
latest: Pulling from yugabytedb/yugabyte
Digest: sha256:0716c8c7d782b8380727d9e0768136fb7f7103f9aebf66fc170978d824ffe425
Status: Image is up to date for yugabytedb/yugabyte:latest docker.io/yugabytedb/yugabyte:latest
PS YugaByteDB> docker-compose up -d
Creating network “yugabytedb_default” with the default driver
Creating yb-master-n1 … done
Creating yb-tserver-n1 … done
PS YugaByteDB> docker exec -it yb-master-n1 bash -c “YB_ENABLED_IN_POSTGRES=1 FLAGS_pggate_master_addresses=yb-master-n1:7100 /home/yugabyte/postgres/bin/initdb -D /tmp/yb_pg_initdb_tmp_data_dir -U postgres” The files belonging to this database system will be owned by user “root”.
This user must also own the server process.
In YugaByte DB, setting LC_COLLATE to C and all other locale settings to en_US.UTF-8 by default. Locale support will be enhanced as part of addressing Issues · yugabyte/yugabyte-db · GitHub database cluster will be initialized with locales
COLLATE: C
CTYPE: en_US.UTF-8
MESSAGES: en_US.UTF-8
MONETARY: en_US.UTF-8
NUMERIC: en_US.UTF-8
TIME: en_US.UTF-8
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
creating directory /tmp/yb_pg_initdb_tmp_data_dir … ok
creating subdirectories … ok
selecting default max_connections … 300
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … I0926 11:20:54.900111 42 mem_tracker.cc:250] MemTracker: hard memory limit is 1.659352 GB
I0926 11:20:54.900215 42 mem_tracker.cc:252] MemTracker: soft memory limit is 1.410449 GB
I0926 11:20:54.900596 43 async_initializer.cc:73] Starting to init ybclient
I0926 11:20:54.902719 43 async_initializer.cc:77] Successfully built ybclient
W0926 11:20:54.915623 48 reactor.cc:380] pggate_ybclient_R000: Client call yb.master.MasterService.IsInitDbDone has no timeout set for connection id: { remote: 172.27.0.2:7100 idx: 0 protocol: 0x00007fa6284a9d18 → tcp }
ok
performing post-bootstrap initialization … I0926 11:21:11.094147 81 mem_tracker.cc:250] MemTracker: hard memory limit is 1.659352 GB
I0926 11:21:11.094249 81 mem_tracker.cc:252] MemTracker: soft memory limit is 1.410449 GB
I0926 11:21:11.094722 82 async_initializer.cc:73] Starting to init ybclient
I0926 11:21:11.096873 82 async_initializer.cc:77] Successfully built ybclient
and then when trying to run ysqlsh to connect to the service :
PS YugaByteDB> docker exec -it yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 --echo-queries
ysqlsh: FATAL: role “yugabyte” does not exist
PS YugaByteDB> docker exec -it yb-tserver-n1 /home/yugabyte/bin/ysqlsh -U postgres -h yb-tserver-n1 --echo-queries
ysqlsh: FATAL: database “postgres” does not exist
PS YugaByteDB> docker exec -it yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 --echo-queries
ysqlsh: FATAL: Not found: Error loading table with oid 1260 in database with oid 1: The object does not exist: table_id: “000000010000300080000000000004ec”
Thanks! Working now, I had a weird character in my docker-compose.yaml file and the latest change to include the —enable_ysql was not being run. Nevertheless, i suggest you to update the documentation about the docker-compose.yaml definition to include this flag.