You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create an ssh tunnel, before I can get a dump of a dev db. This involves installing openssh and running ssh. While I can do the installs and possibly create the tunnel from the Dockerfile.
I say possibly because the exact same commands that work if I start container run through the bash shell, do not work if I run them from Dockerfile. There is an invalid format error on the private key; the exact same private key the works if I run under bash from a running container. But that is another issue.
Anyway, I am pretty sure I am not the only one who has gone through this. It seems years ago this was not an issue as we could run scripts as root or at least commands as root in the startup scripts in ./docker-entrypoiint-initdb.d, however this is not the case anymore. I figure there is some work around or best practice. But I have not been able to find it.
And it seems like the advise is to create a custom Image from postgres image. Is this still the recommendation? Just seems like there should be a way to run root commands in a startup script.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
I need to create an ssh tunnel, before I can get a dump of a dev db. This involves installing openssh and running ssh. While I can do the installs and possibly create the tunnel from the
Dockerfile
.I say possibly because the exact same commands that work if I start container run through the bash shell, do not work if I run them from
Dockerfile
. There is an invalid format error on the private key; the exact same private key the works if I run under bash from a running container. But that is another issue.Anyway, I am pretty sure I am not the only one who has gone through this. It seems years ago this was not an issue as we could run scripts as root or at least commands as root in the startup scripts in
./docker-entrypoiint-initdb.d
, however this is not the case anymore. I figure there is some work around or best practice. But I have not been able to find it.I have also posted on stackoverflow about this.
https://stackoverflow.com/questions/74855870/open-ssh-tunnel-during-postgis-docker-build?noredirect=1#comment132105437_74855870
Seems the closest information I have found to what I am trying to do is
docker-library/postgres#973
And it seems like the advise is to create a custom Image from postgres image. Is this still the recommendation? Just seems like there should be a way to run root commands in a startup script.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: