A dockerized development box based on centos 7, with Python, Java, JavaScript (nodejs), Ruby, and some often-used tools.
Currently installed:
- python 2.7.5
- nodejs v6.11.3
- ruby 2.4.1p111
- openjdk 1.8.0_144
- groovy 2.4.9
Please feel free to open feature requests and pull requests if anything reasonable is missing.
docker run --rm -ti ouyi/docker-centos-dev
or
docker run --net=host -w "$HOME" -e USER_NAME=$USER -e USER_HOME="$HOME" -e USER_ID=$(id -u $USER) -v $HOME/home_$USER:/$HOME--name some_name -ti ouyi/docker-centos-dev
On Fedora 25, I had to either use the --privileged
option or sudo setenforce 0
to get around permission issues.
On macOS Mojave, I am using the following command to run it:
docker run --dns-search mydomain.com -p 8000-8020:8000-8020 -w /home/ouyi -e USER_NAME=ouyi -e USER_HOME=/home/ouyi -e USER_ID=$(id -u ouyi) -v /Users/ouyi/home_ouyi:/home/ouyi --name centos-ouyi -ti ouyi/docker-centos-dev:1.2.2
Create a Dockerfile similar to this:
FROM ouyi/docker-centos-dev
MAINTAINER username
RUN echo "Installing more stuff here."
RUN useradd username
WORKDIR /home/username
Build it with:
docker build . -t username/centos-username
Run it with:
docker run -u username -v $HOME/home_username:/home/username --name centos-username --rm -ti username/centos-username
You can attach to the container as root:
docker exec -u 0 -it centos-username bash
You may want to change username to whatever name you prefer.