fat-tire / resolve

Container scripts to build and run DaVinci Resolve [Studio] for Linux using Docker or Podman
MIT License
193 stars 23 forks source link

[Help] How can I install something in system without lost after close the bash #51

Closed Milor123 closed 4 months ago

Milor123 commented 6 months ago

Guys I am trying install a app, for example python, or ruby using yum install, and it works but when I close and open again it, I lose all :/

What need I modify ? please help me, sorry i am very noob in podman

Edit 1:

I've tried follow the next tutorial from https://phoenixnap.com/kb/how-to-commit-changes-to-docker-image :

Note: after try use this guide, When I open the resolve.sh it open in bash or sh, but dont open the program and dont load the ENV, becuase if I try open resolve typing /opt/resolve/bin/resolve, i need manually add in the console __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only else davinci dont open.

PD 2: I've removed the --rm \ from resolve.sh for follow the tutorial

================================================

How to Commit Changes to a New Docker Image

The steps you must take to create a Docker image based on another image involves:

Follow the steps below to create a new Docker image using docker commit:

1. Use docker run with the -it flag to launch a container in the interactive mode and enable a terminal typing interface. Specify the interface shell as the last command argument.

docker run -it [image] [shell]
docker run -it ubuntu /bin/bash
apt install nmap -y
exit
docker ps -a
docker commit [container-id] [new-image-name]
docker commit c624caff45a8 ubuntu-with-nmap
docker images

================================================

fat-tire commented 6 months ago

This seems to be more of a question about how docker works-- the resolve images are designed to be "ephemeral", meaning that ONLY changes to the volumes which are mounted will be preserved when the container is stopped. The next time you run it, the container will be "fresh" with none of the previous changes. This is the intended behavior.

If there is a package you want to install to the container and keep having it installed the next time you run it, you could remove the -rm from the run command, but the better way would be to add it to your Dockerfile and rerun the ./build.sh command.

Doing so might be easier than creating a whole new image, although this works as well.

Does this help?

fat-tire commented 5 months ago

Was this resolved?

Milor123 commented 4 months ago

¿Se resolvió esto?

Yes thank u very much !, I've added the changes in build script