Skip to content

Commit

Permalink
Get rbenv working on kubectl exec calls
Browse files Browse the repository at this point in the history
Bypass `rbenv init` which can't be used in this context.
  • Loading branch information
snickell committed Sep 7, 2023
1 parent a4e9a88 commit 63042ee
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions k8s/code.org.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,8 @@ COPY --chown=${UID} --from=code.org-rbenv ${SRC}/Gemfile ${SRC}/Gemfile
#
# DONE HACK WORKAROUNDS FOR APPLE SILICON

# SHELL [ "zsh", "-lc" ]
# `kubectl exec` skips entrypoint (!), so this is the easiest way to
# accomplish `eval $(rbenv init -)` that works for kubectl exec.
ENV PATH=${HOME}/.rbenv/shims:${PATH}

RUN echo 'eval "$(rbenv init -)"' > ${HOME}/.zprofile

ENTRYPOINT [ "zsh", "-lc" ]
# CMD tail -f /dev/null
# CMD [ "./bin/dashboard-server" ]
CMD [ "zsh" ]
CMD [ "./bin/dashboard-server" ]

0 comments on commit 63042ee

Please sign in to comment.