Skip to content

Commit bfaf9c0

Browse files
committed
Add aliases.sh sourcing to mambauser's .bashrc. This way if a user attempts to run interactively, they will have aliases in the bashrc
1 parent 9252a0d commit bfaf9c0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,9 @@ COPY --chown=mambauser:mambauser dockerfiles/docker_tests /home/mambauser/Code/A
9191
COPY --chmod=755 dockerfiles/entrywrapper.sh /usr/local/bin/entrywrapper.sh
9292
COPY --chmod=644 dockerfiles/aliases.sh /etc/profile.d/aliases.sh
9393
COPY --chmod=755 dockerfiles/aliases_print.sh /usr/local/bin/aliases
94+
RUN touch /home/mambauser/.bashrc && \
95+
grep -qxF 'source /etc/profile.d/aliases.sh' /home/mambauser/.bashrc || \
96+
echo 'source /etc/profile.d/aliases.sh' >> /home/mambauser/.bashrc
9497

98+
USER root
9599
ENTRYPOINT ["/usr/local/bin/entrywrapper.sh"]

0 commit comments

Comments
 (0)