Public | Automated Build

Last pushed: a year ago
Short Description
This image is meant to be used to create and chown volumes with docker.
Full Description

thubo/chown

This image is meant to be used to create and chown volumes in docker

Usage

In general the container can be used like this:

# docker run --name data -v </path/to/volume> thubo/chown </path/to/volume> <UID> <GID>

Example

To create an volume at /var/jenkins_home which is owned by 1000:1000, run

# docker run --name data -v /var/jenkins_home thubo/chown /var/jenkins_home 1000 1000

To use the volume from this example, run

# docker run --rm -it --volumes-from data busybox /bin/sh

/ # ls -lah /var
total 20
drwxr-xr-x    5 root     root        4.0K Apr 19 07:03 .
drwxr-xr-x   20 root     root        4.0K Apr 19 07:03 ..
drwxr-xr-x    2 1000     1000        4.0K Apr 19 07:00 jenkins_home
drwxr-xr-x    3 root     root        4.0K Mar 18 16:39 spool
drwxr-xr-x    2 www-data www-data    4.0K Mar 18 16:38 www

or via docker-compose:

data:
  image: thubo/chown
  command: /var/jenkins_home 1000 1000
  volumes:
    - /var/jenkins_home
Docker Pull Command
Owner
thubo
Source Repository

Comments (0)