1
0
mirror of https://github.com/rancher/os.git synced 2025-07-31 06:32:09 +00:00

Give access to docker sockets to rancher user

This commit is contained in:
Darren Shepherd 2015-02-20 12:33:20 -07:00
parent ada9380a91
commit c508994b59
3 changed files with 4 additions and 2 deletions

View File

@ -21,5 +21,6 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
/var/run \
/var/spool && \
passwd -l root && \
addgroup docker && \
addgroup sudo && \
echo '%sudo ALL=(ALL) ALL' > /etc/sudoers.d/sudo-group

View File

@ -1,6 +1,7 @@
FROM base
COPY scripts/dockerimages/scripts/console.sh /usr/sbin/
RUN adduser -G sudo -D -h /home/rancher -s /bin/bash rancher && \
RUN adduser -g rancher -G sudo -D -h /home/rancher -s /bin/bash rancher && \
sed -i 's/\(docker.*\)/\1rancher/g' /etc/group && \
sed -i 's/rancher.*/rancher:rixbL64o6zGmY:16486:0:99999:7:::/g' /etc/shadow && \
mkdir -p /home/rancher && \
chmod 2755 /home/rancher

View File

@ -21,7 +21,7 @@ if [ ! -d ${RANCER_HOME} ]; then
chmod 2755 ${RANCER_HOME}
fi
chown root:rancher /var/run/docker.sock:/var/run/system-docker.sock
chown root:docker /var/run/docker.sock /var/run/system-docker.sock
cat > /etc/respawn.conf << EOF
/sbin/getty 115200 tty1