Created
December 24, 2016 15:41
-
-
Save ymsrk/515b309297274d40595d02ed3d6d5339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos6.8 | |
# update & clean | |
RUN yum update -y; yum clean all; | |
# install sudo | |
RUN yum install -y sudo | |
# root setup passwd | |
RUN echo "root:abc1234" | chpasswd | |
# create user | |
RUN groupadd -g 5000 dev-sec && \ | |
useradd -c 'dev-sec user' -d /home/dev-sec -g dev-sec -m dev-sec && \ | |
echo "dev-sec:abc1234" | chpasswd | |
# sudo user | |
RUN echo 'dev-sec ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
# Timezone | |
# cp -p /etc/sysconfig/i18n /etc/sysconfig/i18n.default | |
# sed -ri 's/en_US/ja_JP/' /etc/sysconfig/i18n | |
RUN cp -p /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
USER dev-sec | |
WORKDIR /home/dev-sec | |
# .bash_profile | |
RUN echo 'export PATH=/usr/bin:/usr/sbin:/sbin:/usr/sr/local/bin:$PATH' >> .bash_profile && \ | |
source ~/.bash_profile | |
# .bashrc | |
COPY .bashrc /home/dev-sec | |
RUN sudo chown dev-sec:dev-sec .bashrc | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment