![]() ![]() Part biolookup is the name of the database that gets created. e can be added optionally to show the commands that are run for debugging. h is for host, -p is for password, and -U is for PGPASSWORD=biolookup sets the password in the environment when this command gets run so there’s no $ PGPASSWORD =biolookup createdb -h localhost -p 5434 -U postgres biolookup Had me covered and suggested increasing the shared memory to 1gb using -shm-size.Ĭreating the database on the already running postgres docker image is a bit more straightforwards: : could not resize shared memory segment "/PostgreSQL.1699521131" to 67128576 bytes: No space left on device ![]() _load_definition(engine=engine, table=defs_table, path=defs_path, test=test)įile "/Users/cthoyt/dev/pyobo/src/pyobo/database/sql/loader.py", line 97, in _load_definitionįile "/Users/cthoyt/dev/pyobo/src/pyobo/database/sql/loader.py", line 311, in _load_table When loading up this big database, thisįile "/Users/cthoyt/dev/pyobo/src/pyobo/database/sql/cli.py", line 52, in loadįile "/Users/cthoyt/dev/pyobo/src/pyobo/database/sql/loader.py", line 65, in load shm-size By default, the shared memory is 64mb. The cryptic path that came after is just the standard path postgres uses. Setting PGDATA ensures that a docker commit will actually persist the database’s content.Setting POSTGRES_PASSWORD explicitly sets the password for the default postgres user.-e/ -env This allows you to specify environment variables.Using $(docker ps -filter "name=postgres-biolookup" -q). Used -name, I can look up my image directly ![]() -d/ -detach Rather than running in my current shell, this backgrounds it.If you don’t give one, docker assigns a silly name for you. Same as the name you give when you push to dockerhub, but it’s probably better to stayĬonsistent. -name This gives a nice name to the container for lookup later.(i.e., 5434) to avoid conflict with my local installation of postgres. I’m mappingįrom the default postgres port inside the container (i.e., 5432) to a non-default one outside Inside the docker container, and the corresponds to what’s visible outside. ![]() -p/ -publish This takes an argument looking like.$ docker run \ -p 5434:5432 \ -name postgres-biolookup \ -detach \ -e POSTGRES_PASSWORD =biolookup \ -e PGDATA =/var/lib/postgresql/pgdata \ -shm-size 1gb \ I’ll definitely be writing another post soon about what that service isĪnd what it does (think Ontology Lookup Service, but not just Preparing the docker image for the Biolookup Service, so biolookup appears many times as This could be as simple as docker run postgres, but thereĪre a few options to add to make the rest of this process more simple. I did not ssh or exec into the Docker image Tutorial are run from the shell of the host system, i.e. Notes Throughout this post, I’ll shorten PostgreSQL to postgres. Using fish, but the following instructions are given with Bourne-again Utilities, including createdb, which I use in the middle of this tutorial. I’m usingĪlso installed PostgreSQL using brew install postgresql, which puts a suite of command line Prerequisites I’m going to assume you have a modern version of docker running. Preloaded with your own database and pushing it back to DockerHub for redistribution. This blog post is about preparing a derivative of the base PostgreSQL Docker image that’s However, it’s not so straightforward to pre-load your ownĭata. PostgreSQL is a powerful relational database management system thatĬan be easily downloaded and installed from ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |