1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-17 01:52:29 +00:00
dotfiles/Dockerfile

58 lines
1.2 KiB
Docker
Raw Normal View History

2017-03-24 15:51:13 +00:00
FROM ubuntu:16.04
2015-04-07 23:24:17 +00:00
2017-03-24 17:11:40 +00:00
RUN apt-get update -y && \
apt-get install -y build-essential \
cmake \
curl \
diffstat \
git \
pkg-config \
python \
python-dev \
python \
python3 \
tmux \
stow \
sudo \
vim \
zsh && \
apt clean
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
RUN pip install virtualenv virtualenvwrapper
2015-04-07 23:24:17 +00:00
# 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
2015-04-08 23:30:27 +00:00
RUN mkdir -p /usr/src/app/
RUN touch /usr/src/app/nocode
RUN chown -R dev:dev /usr/src/app
VOLUME /usr/src/app
2015-04-07 23:24:17 +00:00
WORKDIR /home/dev
ENV HOME /home/dev
2017-03-24 17:11:40 +00:00
RUN mkdir /home/dev/dotfiles/
RUN ls /home/dev/dotfiles
COPY . /home/dev/dotfiles
2015-04-07 23:24:17 +00:00
RUN sh /home/dev/dotfiles/make.sh
# Link in shared parts of the home directory
2017-03-24 17:11:40 +00:00
RUN ln -s /var/shared/.ssh && ln -s /usr/src/app
2015-04-07 23:24:17 +00:00
RUN chsh dev -s /usr/bin/zsh
2015-04-13 08:47:46 +00:00
RUN echo "dev ALL = NOPASSWD: ALL" >> /etc/sudoers
USER dev
2015-04-08 23:30:27 +00:00
WORKDIR /home/dev/app
ENTRYPOINT ["zsh"]