Skip to content
/ bionic Public

Ubuntu 18.04 docker image with helper scripts for running commands as the same UID as on the host

Notifications You must be signed in to change notification settings

cliwrap/bionic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

The Dockerfile in this repository builds a ubuntu:18.04 container (with apt-get update and apt-get upgrade run) which lets you run commands inside the container using a UID and GID which are passed in environment variables from outside the container, so that any files created in a volume mount can be created as the user and group who initiated docker run.

Read more at https://wtanaka.com/node/8271

To download: docker pull cliwrap/bionic

Examples

Create a file called myfile in the current directory

docker run --rm -e "HOSTUID=`id -u`" -v "`pwd`:/work" cliwrap/bionic touch myfile

Create a file with the correct uid and gid in the current directory

docker run --rm -e "HOSTUID=`id -u`" -e "HOSTGID=`id -g`" -v "`pwd`:/work" cliwrap/bionic touch myfile

About

Ubuntu 18.04 docker image with helper scripts for running commands as the same UID as on the host

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published