Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (41 sloc) 1.29 KB
# Container holding a reproman development environment.
#
# To build:
# docker build -t reproman:debian \
# -f Dockerfile-debian \
# --build-arg IMAGE=debian:jessie \
# --build-arg UNAME=$USER \
# --build-arg UID=$(id -u) \
# --build-arg GID=$(id -g) \
# .
#
# or docker-compose build debian(be sure to update IMAGE, UID, and GID in docker-compose.yml)
#
# To run:
# docker run -it --name reproman-debian \
# -v $PWD:/home/$USER/reproman \
# -v /var/run/docker.sock:/var/run/docker.sock \
# reproman:debian
#
# or docker-compose run debian
ARG IMAGE=ubuntu:xenial
FROM $IMAGE
RUN apt-get update \
&& apt-get install -y build-essential libssl-dev libffi-dev vim wget \
python-dev python-pyparsing python-crypto python-pip \
&& pip install --upgrade pip
# Create a container user account that matches a system user account.
ARG UNAME=reproman
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID $UNAME \
&& useradd -m -u $UID -g $GID -s /bin/bash $UNAME
COPY . /home/$UNAME/reproman
COPY reproman.cfg /home/$UNAME
RUN chown -R $UID.$GID /home/$UNAME \
&& rm -r '/home/'$UNAME'/reproman/reproman.egg-info' \
&& find '/home/'$UNAME'/reproman' -name "*.pyc" -delete \
&& pip install -e '/home/'$UNAME'/reproman[devel]'
# USER $UID:$GID
WORKDIR /home/$UNAME
ENTRYPOINT ["/bin/bash"]
You can’t perform that action at this time.