Sign inSign up

wtanaka/bionic-uid

By wtanaka

•Updated over 7 years ago

Ubuntu 18.04 image that lets you run commands inside the container using a UID and GID from outside

Image
1

1.0K

wtanaka/bionic-uid repository overview

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 wtanaka/bionic-uid⁠

⁠Examples

Create a file called myfile in the current directory

docker run --rm -e "HOSTUID=`id -u`" -v "`pwd`:/work" wtanaka/bionic-uid 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" wtanaka/bionic-uid touch myfile

Tag summary

Content type

Image

Digest

Size

33.7 MB

Last updated

over 7 years ago

docker pull wtanaka/bionic-uid