Created
January 16, 2015 19:45
-
-
Save vbatts/545a3b1bec90b1dca658 to your computer and use it in GitHub Desktop.
Devel container
This file contains 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() { | |
if [ ${#SSH_AUTH_SOCK} -gt 0 ] ; then | |
local sock="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK" | |
fi | |
docker run \ | |
--rm \ | |
-i -t \ | |
--hostname=$(hostname -s)-fedora \ | |
-v $HOME:$HOME \ | |
-v $XAUTHORITY:$XAUTHORITY \ | |
-v /tmp/.ICE-unix/:/tmp/.ICE-unix/ \ | |
${sock} \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /usr/bin/docker:/usr/bin/docker:ro \ | |
--env HOME \ | |
--env XAUTHORITY \ | |
--env SESSION_MANAGER \ | |
--env DISPLAY \ | |
--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 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 \ | |
quilt \ | |
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 | |
RUN yum install -y glibc-static device-mapper-devel btrfs-progs-devel sqlite-devel | |
RUN groupadd -g 990 docker | |
USER vbatts | |
ENV HOME /home/vbatts | |
WORKDIR /home/vbatts | |
CMD bash -l |
This file contains 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
NAME := docker.usersys/vbatts/fedora-dev | |
DOCKER := $(shell which docker) | |
all: build | |
build: .build | |
.build: Dockerfile | |
$(DOCKER) build -t $(NAME) . && touch $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment