Guest User

Untitled

a guest
Apr 9th, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.29 KB | None | 0 0
  1. diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
  2. index afcc5b3..a40c34a 100644 (file)
  3. --- a/docker/base/Dockerfile.j2
  4. +++ b/docker/base/Dockerfile.j2
  5. @@ -10,6 +10,9 @@ ENV KOLLA_BASE_DISTRO {{ base_distro }}
  6.  ENV KOLLA_INSTALL_TYPE {{ install_type }}
  7.  ENV KOLLA_INSTALL_METATYPE {{ install_metatype }}
  8.  
  9. +# PS1 var when used /bin/sh shell
  10. +ENV PS1="(docker::$(printenv KOLLA_SERVICE_NAME))[$(id -un)@$(hostname -s) $(pwd)]$ "
  11. +
  12.  # For RPM Variants, enable the correct repositories - this should all be done
  13.  # in the base image so repos are consistent throughout the system.  This also
  14.  # enables to provide repo overrides at a later date in a simple fashion if we
  15. @@ -189,4 +192,10 @@ RUN touch /usr/local/bin/kolla_extend_start \
  16.      && chmod 440 /etc/sudoers \
  17.      && groupadd kolla
  18.  
  19. +# Customize PS1 to be used with bash shell
  20. +COPY kolla_bashrc /tmp/
  21. +RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc
  22. +RUN cat /tmp/kolla_bashrc >> ~/.bashrc
  23. +RUN rm -f /tmp/kolla_bashrc
  24. +
  25.  CMD ["kolla_start"]
  26. diff --git a/docker/base/kolla_bashrc b/docker/base/kolla_bashrc
  27. new file mode 100644 (file)
  28. index 0000000..815720c
  29. --- /dev/null
  30. +++ b/docker/base/kolla_bashrc
  31. @@ -0,0 +1,4 @@
  32. +
  33. +#### Custom data added by Kolla
  34. +
  35. +PS1="(docker::${KOLLA_SERVICE_NAME})[\u@\h \W]\\$ "
Advertisement
Add Comment
Please, Sign In to add comment