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

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

Closed
Milor123 opened this issue May 8, 2024 · 3 comments

Comments

@Milor123
Copy link

Milor123 commented May 8, 2024

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:

  • Running a container from the base image.
  • Making the necessary changes in the container.
  • Committing the changes to a new image.

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
Copy link
Owner

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
Copy link
Owner

Was this resolved?

@Milor123
Copy link
Author

¿Se resolvió esto?

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

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

2 participants