Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-entrypoint.sh permission denied #21

Closed
thromera opened this issue Sep 16, 2014 · 9 comments
Closed

docker-entrypoint.sh permission denied #21

thromera opened this issue Sep 16, 2014 · 9 comments

Comments

@thromera
Copy link

I have a problem launching the container :
2014/09/16 08:56:36 Error response from daemon: Cannot start container 19c947b7844207f0e41e1ed6a6ec130cb0659667a53cf29ad98cde68b0cd5c6e: exec: "/docker-entrypoint.sh": permission denied

Here some output :
root@db:~# ls
docker-entrypoint.sh Dockerfile start.sh

to build the image :
docker build -t postgres .

to run the image :
docker run -t -i -p 5432:5432 --name postgresql -d postgres /bin/bash

@tianon
Copy link
Member

tianon commented Sep 16, 2014

Is your local script executable? "chmod +x docker-entrypoint.sh"

@thromera
Copy link
Author

already tried it.


Thomas Romera
5ème année Epitech Paris
[1]http://thomas-romera.com

Le Mar 16 sept. 2014, à 19:23, Tianon Gravi a écrit :

Is your local script executable? "chmod +x
docker-entrypoint.sh"


Reply to this email directly or [2]view it on GitHub.

References

  1. http://thomas-romera.com/
  2. docker-entrypoint.sh permission denied #21 (comment)

@tianon
Copy link
Member

tianon commented Sep 16, 2014

Then we're definitely going to need a lot more information about the files you've got. Where'd they come from? I see they aren't from a git clone of this repo (at least not obviously), so I'm curious how they got where they are, and what you are expecting of them. Can you put them together in a gist so we can better see what's going on?

@magick93
Copy link

Hi

I have the same problem.

I have just tried to build and run the files from https://github.com/docker-library/postgres/tree/4603177ae330d135dea953b42aec28fe1eef514e/9.3

Error response from daemon: Cannot start container 4b5492eb090186f14a5451040496fe2eb63a1e719f2c64a823ad995047ba681f: exec: "/docker-entrypoint.sh": permission denied

@yosifkit
Copy link
Member

Did you clone the repo or did you just download the files? The docker-entrypoint.sh will need a chmod +x before you build it, if you just downloaded them.

@yosifkit
Copy link
Member

Unable to reproduce. Closing. (feel free to post if more information is found to reproduce)

@asevans48
Copy link

Why is this closed? I just received this running "sudo docker run -i --name simplretl --cpus 2 -p 5432:5432 -e POSTGRES_PASSWORD=**** -e POSTGRES_USER=**** postgres"

@tianon
Copy link
Member

tianon commented Jan 9, 2018

@asevans48 as @yosifkit pointed out above (no less than 3 years ago now), we cannot reproduce a failure:

$ docker pull postgres
Using default tag: latest
latest: Pulling from library/postgres
Digest: sha256:3f4441460029e12905a5d447a3549ae2ac13323d045391b0cb0cf8b48ea17463
Status: Downloaded newer image for postgres:latest

$ docker run -it --rm --cpus 2 -p 5432:5432 -e POSTGRES_PASSWORD='xxx' -e POSTGRES_USER='yyy' postgres
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
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.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2018-01-09 17:48:38.390 UTC [39] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2018-01-09 17:48:38.390 UTC [39] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2018-01-09 17:48:38.390 UTC [39] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2018-01-09 17:48:38.392 UTC [39] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-01-09 17:48:38.400 UTC [40] LOG:  database system was shut down at 2018-01-09 17:48:38 UTC
2018-01-09 17:48:38.403 UTC [39] LOG:  database system is ready to accept connections
 done
server started
CREATE DATABASE

CREATE ROLE


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2018-01-09 17:48:38.895 UTC [39] LOG:  received fast shutdown request
waiting for server to shut down....2018-01-09 17:48:38.897 UTC [39] LOG:  aborting any active transactions
2018-01-09 17:48:38.898 UTC [39] LOG:  worker process: logical replication launcher (PID 46) exited with exit code 1
2018-01-09 17:48:38.898 UTC [41] LOG:  shutting down
2018-01-09 17:48:38.911 UTC [39] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2018-01-09 17:48:39.023 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2018-01-09 17:48:39.023 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2018-01-09 17:48:39.026 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-01-09 17:48:39.041 UTC [66] LOG:  database system was shut down at 2018-01-09 17:48:38 UTC
2018-01-09 17:48:39.045 UTC [1] LOG:  database system is ready to accept connections

@liadmagen
Copy link

If anyone encounter this problem, please consider updating or reinstalling docker on your machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants