Add fedora 22 dev image

This commit is contained in:
Christine Dodrill 2015-06-24 00:08:13 -07:00
parent 3b4051303e
commit 30b0a4fd70
3 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,39 @@
FROM fedora:22
RUN dnf -y groupinstall "Development Tools" &&\
dnf -y install tar zsh git python wget openssl-devel vim-enhanced tmux dtach cmake python-devel mercurial lua luarocks gcc-c++ xz clang-devel &&\
useradd --create-home xena && \
echo 'root:screencast' | chpasswd && \
echo 'xena:user' | chpasswd && \
chsh xena -s /bin/zsh
# Envvars!
ENV HOME /home/xena
ENV DOCKER YES
ENV LANGUAGE en_US
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
# To use Docker please pass the docker socket as a bind mount
# Some of my servers still use docker 1.3.0
RUN wget https://get.docker.com/builds/Linux/x86_64/docker-1.3.0 -O /usr/local/bin/docker && \
chmod 555 /usr/local/bin/docker
# Golang compilers
RUN cd /usr/local && wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz && \
tar xf go1.4.2.linux-amd64.tar.gz && rm go1.4.2.linux-amd64.tar.gz
ADD setup.sh /opt/xena/setup.sh
ADD ./vimplugins.lua /opt/xena/vimplugins.lua
RUN chmod 777 /opt/xena/setup.sh &&\
su xena "/opt/xena/setup.sh"
RUN dnf -y install dnf-plugins-core &&\
yes | dnf copr enable xena/moonscript &&\
dnf -y install lua-moonscript &&\
yes | dnf copr enable avsej/nim &&\
dnf -y install nim
USER xena
CMD /bin/zsh

48
dev/fedora/22/base/setup.sh Executable file
View File

@ -0,0 +1,48 @@
#!/bin/bash
set -x
# Sanity check / setup
cd /home/xena
mkdir code ||:
# Clone dotiles
git clone https://github.com/Xe/dotfiles code/dotfiles ||:
# setlink sets a symlink to my dotfiles repo for the correct file.
function setlink
{
rm -rf $HOME/$1
ln -s $HOME/code/dotfiles/$1 $HOME/$1
}
# set links
setlink .zshrc
setlink .zsh
setlink .vim
setlink .vimrc
setlink .gitconfig
setlink .tmux.conf
export GOPATH=/home/xena/go
export PATH=/usr/local/go/bin:$PATH
# Golang stuff
(mkdir -p ~/go/{pkg,bin,src})
go get github.com/mattn/todo
go get github.com/motemen/ghq
go get github.com/Xe/tools/license
# Setup vundle
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# Set up vim plugins
cat ~/.vimrc | grep Plugin | cut -d"'" -f2 > ~/.plugins
(cd ~/.vim/bundle && lua /opt/xena/vimplugins.lua ~/.plugins)
# Binary extensions for vim
(cd ~/.vim/bundle/YouCompleteMe; ./install.sh --clang-completer)
(cd ~/.vim/bundle/vimproc.vim; make)
vim -T dumb +GoInstallBinaries +qall
echo "Set up!"

View File

@ -0,0 +1,12 @@
fin = io.open(arg[1], "r")
if fin == nil then
error("Can't open " .. arg[1])
end
for line in fin:lines() do
os.execute("git clone https://github.com/" .. line)
os.execute("cd " .. line:match(".+/(.+)") .. " && git submodule update --init --recursive && cd ..")
end
fin:close()