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

How to make /etc/containers persistent after a restart #23

Open
Teg79 opened this issue Mar 17, 2020 · 1 comment
Open

How to make /etc/containers persistent after a restart #23

Teg79 opened this issue Mar 17, 2020 · 1 comment

Comments

@Teg79
Copy link

Teg79 commented Mar 17, 2020

I need to add registries and insecure registries to podman conf, but after a podman-machine restart box I lose the configuration.
Is there any way to make it persistent across restarts?

A solution I'm working on is to mount a host folder as /etc/containers but it would be great to have an official solution on the readme

@afbjorklund
Copy link
Contributor

afbjorklund commented Mar 17, 2020

There is a script /opt/bootsync.sh in TCL, where you can do such things

Actually there are two, but that is more for if you want to do slow things.

#!/bin/sh
# put other system startup commands here, the boot process will wait until they complete.
# Use bootlocal.sh for system startup commands that can run in the background 
# and therefore not slow down the boot process.

We use it to call a script in the persisted part, where you can add your own things:

/var/lib/boot2podman/bootlocal.sh

if [ -e /var/lib/boot2podman/bootlocal.sh ]; then
	sh /var/lib/boot2podman/bootlocal.sh &
fi

/opt/bootlocal.sh &

Rebuilding the image is also an option, add links/mount like we do for other things.

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