fix mistake #1427 about user aliases.

This commit is contained in:
Shao Yu Lung 2018-03-23 15:17:35 +08:00
parent 9a9d30f173
commit 4d384c0a67
4 changed files with 52 additions and 20 deletions

View File

@ -151,14 +151,22 @@ 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 && \
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,22 @@ 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 && \
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,22 @@ 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 && \
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,22 @@ 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 && \
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: