Skip to content

This repository provides a minimum template configuration so that the container's user home folder is mirrored in the host, making its files persistent.

Notifications You must be signed in to change notification settings

hbaqueiro/persistent-home-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

persistent-home-docker

This repository provides a minimum template configuration so that the container's user home folder is mirrored in the host, making its files persistent.


Usage

  1. Clone (or download) this repository:
git clone [email protected]:hbaqueiro/persistent-home-docker.git
  1. Adapt Dockerfile to your needs. In this example, configuration was set up to work with ROS2 Foxy and Gazebo. You may want to rename the image in both Dockerfile and run-devel.bash.

  2. Run run-devel.bash (make sure it has execute permission):

chmod +x run-devel.bash
./run-devel.bash

The home folder of this repository will mirror and persist all the data of the container's home folder.


Tip

I find extremely useful to keep a docker monitor running in a separate terminal showing the images, the running and the stopped containers.

For that, add the following to your host's ~/.bash_aliases:

alias docker_status='echo === IMAGES =============== && docker images && echo && \
             echo === RUNNING CONTAINERS === && docker ps && echo && \
             echo === ALL CONTAINERS ======= && docker ps -a'
alias docker_monitor='while true; clear; do docker_status; sleep 5; done'

Then:

source ~/.bash_aliases
docker_monitor

References

About

This repository provides a minimum template configuration so that the container's user home folder is mirrored in the host, making its files persistent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published