Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(permissions): add option to make file generated in docker shell … #2556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docker-compose.yml
Expand Up @@ -130,6 +130,7 @@ services:
- INSTALL_GIT_PROMPT=${WORKSPACE_INSTALL_GIT_PROMPT}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- GROUP_WRITABLE=${WORKSPACE_GROUP_WRITABLE}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
Expand Down
1 change: 1 addition & 0 deletions env-example
Expand Up @@ -158,6 +158,7 @@ WORKSPACE_INSTALL_YAML=false
WORKSPACE_INSTALL_MAILPARSE=false
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_GROUP_WRITABLE=false
WORKSPACE_CHROME_DRIVER_VERSION=2.42
WORKSPACE_TIMEZONE=UTC
WORKSPACE_SSH_PORT=2222
Expand Down
18 changes: 17 additions & 1 deletion workspace/Dockerfile
Expand Up @@ -119,14 +119,23 @@ RUN sed -i 's/\r//' /root/aliases.sh && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc

USER laradock

RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc

ARG GROUP_WRITABLE=false
ENV GROUP_WRITABLE ${GROUP_WRITABLE}


RUN if [ ${GROUP_WRITABLE} = true ]; then \
echo "# Make Group Writable" >> ~/.bashrc && \
echo "umask 002;" >> ~/.bashrc && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the semicolon is not necessary

echo "" >> ~/.bashrc \
;fi
###########################################################################
# Composer:
###########################################################################
Expand Down Expand Up @@ -1334,6 +1343,13 @@ bindkey "^[[6~" down-line-or-history\n\
bindkey "^?" backward-delete-char\n' >> /home/laradock/.zshrc \
;fi


RUN if [ ${GROUP_WRITABLE} = true ] && [ ${SHELL_OH_MY_ZSH} = true ]; then \
echo "# Make Group Writable" >> /home/laradock/.zshrc && \
echo "umask 002;" >> /home/laradock/.zshrc && \
echo "" >> /home/laradock/.zshrc \
;fi

USER root

#
Expand Down