![]() ![]() docker run -it richxsl/rhel6.5 bash root5f3b0b7539a3 / tar bash: tar: command not found root5f3b0b7539a3 / yum install tar Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. ![]() RUN pip install -no-cache-dir -no-warn-script-location -r requirements. I tried with a similar one, richxsl/rhel6.5 bash. The idea is that you install dependencies and then run some configuration commands.īe aware that CMD can be replaced at runtime.ĭocker run myimage # Base image, based on python installed on debian Please find below an example of what you could use instead of the provided dockerfile. Sudo is not necessary as you can install everything before switching users.Įach version of your image should replace only delta parts. RUN useradd -m docker & echo "docker:docker" | chpasswd & adduser docker sudo RUN apt-get -y update & apt-get -y install sudo Asking for help, clarification, or responding to other answers. The command '/bin/sh -c sudo apt-get install -y sqlite3' returned a non-zero code: 1 Thanks for contributing an answer to Stack Overflow Please be sure to answer the question.Provide details and share your research But avoid. I needed to have a linux distro installed (I chose Ubuntu 20.x) AND make sure it was set as the default, via running wsl -s. Sudo: a terminal is required to read the password either use the -S option to read from standard input or configure an askpass helper The biggest issue was my misunderstanding about Docker WSL2 integration and that the sail command should be run from within WLS (coming from Laradock, I made some incorrect assumptions). The error: Step 6/19 : RUN sudo apt-get install -y sqlite3 If you want to copy any files from host machine to docker image, first you should add that files to docker image using add command. But Sqlite isn't getting installed because sudo needs a password. However, you can always try to execute the script outside docker with docker exec -ti -user root container /path/to/script or create a Dockerfile with you script. Running sudo statements on Docker is a bad idea. I'm trying to build a docker container containing Sqlite3 and Flask. That may sound crazy, but I fixed the issue by just installing sudo After that, the rootless docker is similar to a normal one. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |