mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-24 05:02:29 +00:00
Added Docker development file
This commit is contained in:
parent
5b443ec699
commit
520ff98ef2
42
DevDockerfile
Normal file
42
DevDockerfile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
FROM ubuntu:14.04
|
||||||
|
|
||||||
|
RUN apt-get update -y
|
||||||
|
RUN apt-get install -y curl
|
||||||
|
RUN apt-get install -y diffstat
|
||||||
|
RUN apt-get install -y git
|
||||||
|
RUN apt-get install -y python
|
||||||
|
RUN apt-get install -y python3
|
||||||
|
RUN apt-get install -y tmux
|
||||||
|
RUN apt-get install -y vim
|
||||||
|
RUN apt-get install -y zsh
|
||||||
|
|
||||||
|
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2
|
||||||
|
RUN pip install virtualenv
|
||||||
|
RUN pip install virtualenvwrapper
|
||||||
|
|
||||||
|
# Setup home environment
|
||||||
|
RUN useradd dev
|
||||||
|
RUN mkdir /home/dev && chown -R dev: /home/dev
|
||||||
|
ENV PATH /home/dev/bin:$PATH
|
||||||
|
|
||||||
|
# Create a shared data volume
|
||||||
|
# We need to create an empty file, otherwise the volume will
|
||||||
|
# belong to root.
|
||||||
|
# This is probably a Docker bug.
|
||||||
|
RUN mkdir /var/shared/
|
||||||
|
RUN touch /var/shared/placeholder
|
||||||
|
RUN chown -R dev:dev /var/shared
|
||||||
|
VOLUME /var/shared
|
||||||
|
|
||||||
|
WORKDIR /home/dev
|
||||||
|
ENV HOME /home/dev
|
||||||
|
ADD . /home/dev/dotfiles
|
||||||
|
RUN sh /home/dev/dotfiles/make.sh
|
||||||
|
|
||||||
|
# Link in shared parts of the home directory
|
||||||
|
RUN ln -s /var/shared/.ssh
|
||||||
|
RUN chsh dev -s /usr/bin/zsh
|
||||||
|
|
||||||
|
RUN chown -R dev: /home/dev
|
||||||
|
ENTRYPOINT ["/usr/bin/zsh", "-i"]
|
||||||
|
USER dev
|
9
make.sh
9
make.sh
@ -6,10 +6,15 @@
|
|||||||
|
|
||||||
########## Variables
|
########## Variables
|
||||||
|
|
||||||
dir=$(pwd) # dotfiles directory
|
# dotfiles directory
|
||||||
|
dir=`dirname $0`
|
||||||
|
|
||||||
|
########## Don't forget the submodules
|
||||||
|
git submodule init
|
||||||
|
git submodule update --recursive
|
||||||
|
|
||||||
olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory
|
olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory
|
||||||
files=$(ls --ignore="not_dots" --ignore="README.md" --ignore="make.sh" $dir) # list of files/folders to symlink in homedir
|
files=$(ls --ignore="not_dots" --ignore="README.md" --ignore="make.sh" --ignore="DevDockerfile" $dir) # list of files/folders to symlink in homedir
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user