WASdev / ci.docker.websphere-traditional

Dockerfiles for WebSphere Application Server traditional
Apache License 2.0
171 stars 192 forks source link

Can't install new software due to privilege issue #104

Closed vipnaik closed 5 years ago

vipnaik commented 5 years ago

I was able to run container successfully using image ibmcom/websphere-traditional:8.5.5.12-install. Server is running. Now I am inside container and want to install new softwares like unzip and wget using apt-get. But while trying that I am getting below error:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

davidcurrie commented 5 years ago

As the error suggests, you are not root. In general, you don't want to be installing software in a running container. If you want to add new packages, do so in a Dockerfile when you are building the image. You can then use the USER directive to switch to root and then back to the WAS user.

vipnaik commented 5 years ago

Hi @davidcurrie , Thanks. I will try that.

arthurdm commented 5 years ago

any luck with that @vipnaik?

arturdzm commented 5 years ago

Closing, re-open if needed