dockerhub

In a Dockerfile, How to update PATH environment variable?

安稳与你 提交于 2019-11-26 23:44:47
I have a dockerfile that download and builds GTK from source, but the following line is not updating my image's environment variable: RUN PATH="/opt/gtk/bin:$PATH" RUN export PATH I read that that I should be using ENV to set environment values, but the following instruction doesn't seem to work either: ENV PATH /opt/gtk/bin:$PATH This is my entire Dockerfile: FROM ubuntu RUN apt-get update RUN apt-get install -y golang gcc make wget git libxml2-utils libwebkit2gtk-3.0-dev libcairo2 libcairo2-dev libcairo-gobject2 shared-mime-info libgdk-pixbuf2.0-* libglib2-* libatk1.0-* libpango1.0-* xserver

How to create User/Database in script for Docker Postgres

筅森魡賤 提交于 2019-11-26 16:57:22
I have been trying to set up a container for a development postgres instance by creating a custom user & database. I am using the official postgres docker image . In the documentation it instructs you to insert a bash script inside of the /docker-entrypoint-initdb.d/ folder to set up the database with any custom parameters. My bash script: make_db.sh su postgres -c "createuser -w -d -r -s docker" su postgres -c "createdb -O docker docker" Dockerfile FROM library/postgres RUN ["mkdir", "/docker-entrypoint-initdb.d"] ADD make_db.sh /docker-entrypoint-initdb.d/ The error I get from the docker

Check if image:tag combination already exists on docker hub

风流意气都作罢 提交于 2019-11-26 16:12:58
问题 As part of a bash script, I want to check if a particularly docker image:tag combination exists on docker hub. Also, it will be a private repository. i.e. the pseudocode would be like: tag = something if image:tag already exists on docker hub: Do nothing else Build and push docker image with that tag 回答1: Please try this one function docker_tag_exists() { curl --silent -f -lSL https://index.docker.io/v1/repositories/$1/tags/$2 > /dev/null } if docker_tag_exists library/nginx 1.7.5; then echo

How to create User/Database in script for Docker Postgres

泄露秘密 提交于 2019-11-26 06:11:59
问题 I have been trying to set up a container for a development postgres instance by creating a custom user & database. I am using the official postgres docker image. In the documentation it instructs you to insert a bash script inside of the /docker-entrypoint-initdb.d/ folder to set up the database with any custom parameters. My bash script: make_db.sh su postgres -c \"createuser -w -d -r -s docker\" su postgres -c \"createdb -O docker docker\" Dockerfile FROM library/postgres RUN [\"mkdir\", \"