diff --git a/.dockerignore b/.dockerignore index 030247d7af6..eaf24be9841 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,7 +8,9 @@ demo images log plans +results support +!support/devshell_profile.sh tmp vendor www diff --git a/Dockerfile b/Dockerfile index 99e5e318ede..a671a1ca4bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,7 @@ RUN ln -snf /usr/bin/nodejs /usr/bin/node && npm install -g docco && echo "docco RUN (adduser --system hab || true) && (addgroup --system hab || true) +COPY support/devshell_profile.sh /root/.bash_profile COPY .delivery/scripts/ssh_wrapper.sh /usr/local/bin COPY .delivery/scripts/git_src_checkout.sh /usr/local/bin COPY components/hab/install.sh /tmp @@ -54,4 +55,4 @@ RUN /tmp/install.sh \ && rm -rf /tmp/install.sh /hab/cache/{keys,artifacts} WORKDIR /src -CMD ["bash"] +CMD ["bash", "-l"] diff --git a/support/devshell_profile.sh b/support/devshell_profile.sh new file mode 100644 index 00000000000..378a8d16d19 --- /dev/null +++ b/support/devshell_profile.sh @@ -0,0 +1,28 @@ +info() { + case "${TERM:-}" in + *term | xterm-* | rxvt | screen | screen-*) + printf -- " \033[1;36mHabitat devshell: \033[1;37m$1\033[0m\n" + ;; + *) + printf -- " devshell: $1\n" + ;; + esac + return 0 +} + +echo +info 'Plan for success!' + +if [[ -n "$HAB_ORIGIN" ]]; then + info "Exported: HAB_ORIGIN=$HAB_ORIGIN" +fi +if [[ -n "$HAB_DEPOT_URL" ]]; then + info "Exported: HAB_DEPOT_URL=$HAB_DEPOT_URL" +fi +if [[ -n "$http_proxy" ]]; then + info "Exported: http_proxy=$http_proxy" +fi +if [[ -n "$https_proxy" ]]; then + info "Exported: https_proxy=$https_proxy" +fi +echo