Last active
August 29, 2015 14:00
-
-
Save vbatts/11189054 to your computer and use it in GitHub Desktop.
Convenience function, for entering a fedora development environment, while in my current working directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fedora() { | |
docker run \ | |
--rm \ | |
-i -t \ | |
--hostname=$(hostname)-fedora \ | |
-v $HOME:$HOME \ | |
-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK \ | |
--env HOME \ | |
--user $USER \ | |
--env SSH_AUTH_SOCK \ | |
--env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin \ | |
--privileged \ | |
--workdir $(pwd) \ | |
${1+"$@"} \ | |
docker.usersys/vbatts/fedora-dev:20 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fedora:20 | |
RUN yum erase -y vim-minimal &&\ | |
yum groupinstall -y "development tools" && \ | |
yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs \ | |
yum-utils \ | |
git \ | |
golang \ | |
mercurial \ | |
bzr \ | |
vim-enhanced \ | |
fedora-packager \ | |
sudo \ | |
screen \ | |
libtool \ | |
gtk-doc \ | |
intltool \ | |
libgcrypt-devel \ | |
gperf \ | |
libcap-devel \ | |
wget \ | |
tig \ | |
glib2-devel \ | |
keychain \ | |
tito && \ | |
yum update -y && \ | |
yum clean all && \ | |
useradd -m -u 1000 -G wheel,mock vbatts && \ | |
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers | |
USER vbatts | |
ENV HOME /home/vbatts | |
WORKDIR /home/vbatts | |
CMD bash -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vbatts@noyee ~ (master) $ cd src/docker/docker | |
vbatts@noyee ~/src/docker/docker (vbatts-v2_hacking) $ ls -l | tail -5 | |
-rw-rw-r--. 1 vbatts vbatts 20248 Jul 25 10:21 vbatts-registry_image_freshness.vim | |
-rw-rw-r--. 1 vbatts vbatts 30722 Aug 22 08:05 vbatts-tarsum_versioning.vim | |
-rw-rw-r--. 1 vbatts vbatts 63891 Aug 26 23:08 vbatts-v2_hacking.vim | |
drwxrwxr-x. 3 vbatts vbatts 4096 Jun 10 19:00 vendor/ | |
-rw-rw-r--. 1 vbatts vbatts 10 Aug 26 09:07 VERSION | |
# enter into the container | |
vbatts@noyee ~/src/docker/docker (vbatts-v2_hacking) $ fedora | |
vbatts@noyee-fedora ~/src/docker/docker (vbatts-v2_hacking) $ ls -l | tail -5 | |
-rw-rw-r--. 1 vbatts vbatts 20248 Jul 25 17:21 vbatts-registry_image_freshness.vim | |
-rw-rw-r--. 1 vbatts vbatts 30722 Aug 22 15:05 vbatts-tarsum_versioning.vim | |
-rw-rw-r--. 1 vbatts vbatts 63891 Aug 27 06:08 vbatts-v2_hacking.vim | |
drwxrwxr-x. 3 vbatts vbatts 4096 Jun 11 02:00 vendor/ | |
-rw-rw-r--. 1 vbatts vbatts 10 Aug 26 16:07 VERSION | |
# everying still feels the same, but the host wrapper has changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment