![]() ![]() -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. Will create ConfigMap like this and mount it into the running container as /opt/bitnami/postgresql/conf/conf.d/nf, postgres will know to pick it up and apply.PostgreSQL is a powerful relational database management system thatĬan be easily downloaded and installed from Then helm install myrelease bitnami/postgresql -values values.yaml I'm pretty sure the is BS from the look of īut you can add your config file using a values.yaml with content like: primary: Helm install myrelease bitnami/postgresql Similar result, the config should be effectiveĪlso if you postgres via binami helm chart: helm repo add bitnami Now after edited the conf/n, I start another, overriding the full config:ĭocker run -rm -name postgresql -ePOSTGRESQL_PASSWORD=123456 -v /Users/hoaphan/dev/code/conf/nf:/opt/bitnami/postgresql/conf/nf bitnami/postgresql:15.2.0 Start the original container (eg: docker run -rm -it bitnami/postgresql:15.2.0 bash)Ĭopy the original config out onto your host(here I take the whole directory)ĭocker cp postgresql:/opt/bitnami/postgresql/conf. But if for some reason you still want to override the full original config, you can: ![]() With just (no config mounted) docker run -rm -name postgresql -ePOSTGRESQL_PASSWORD=123456 bitnami/postgresql:15.2.0 You can verify that this is effective when compare the mount of logging: ➜ code docker run -rm -name postgresql -ePOSTGRESQL_PASSWORD=123456 -v /Users/hoaphan/dev/code/nf:/opt/bitnami/postgresql/conf/conf.d/nf bitnami/postgresql:15.2.0 For simplicity, you can declare just the config you want to overwrite, then mount it onto opt/bitnami/postgresql/conf/conf.d/nf.įor example I have this config file ➜ code cat nf ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |