Merge pull request #1447 from bestlong/fix-users-aliases

fix mistake #1427 about user aliases.
This commit is contained in:
Yu-Lung Shao (Allen) 2018-03-23 16:51:41 +08:00 committed by GitHub
commit 2ab11bf1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 20 deletions

View File

@ -151,14 +151,23 @@ RUN chmod -R 644 /etc/cron.d
#####################################
USER root
COPY ./aliases.sh /root/aliases.sh
COPY ./aliases.sh /home/laradock/aliases.sh
RUN sed -i 's/\r//' /root/aliases.sh && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh && \
echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
USER laradock
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
#####################################
# xDebug:

View File

@ -148,14 +148,23 @@ RUN chmod -R 644 /etc/cron.d
#####################################
USER root
COPY ./aliases.sh /root/aliases.sh
COPY ./aliases.sh /home/laradock/aliases.sh
RUN sed -i 's/\r//' /root/aliases.sh && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh && \
echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
USER laradock
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
#####################################
# xDebug:

View File

@ -143,14 +143,23 @@ RUN chmod -R 644 /etc/cron.d
#####################################
USER root
COPY ./aliases.sh /root/aliases.sh
COPY ./aliases.sh /home/laradock/aliases.sh
RUN sed -i 's/\r//' /root/aliases.sh && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh && \
echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
USER laradock
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
#####################################
# xDebug:

View File

@ -143,14 +143,23 @@ RUN chmod -R 644 /etc/cron.d
#####################################
USER root
COPY ./aliases.sh /root/aliases.sh
COPY ./aliases.sh /home/laradock/aliases.sh
RUN sed -i 's/\r//' /root/aliases.sh && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh && \
echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
USER laradock
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh
echo "source ~/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
#####################################
# xDebug: