mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fix Dev Container KBN_DIR (#195810)
## Summary In #193488, `KBN_DIR` was changed to be a dynamic variable. It wasn't being properly propagated through the build process in the Dockerfile and the full path to `env.sh` wasn't being set. This passes the directory as a build `ARG` as well to fix the path.
This commit is contained in:
parent
8700807899
commit
686b0214ce
2 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
|
||||
|
||||
ARG KBN_DIR
|
||||
|
||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
|
||||
ENV HOME=/home/vscode
|
||||
ENV NVM_DIR=${HOME}/nvm
|
||||
|
@ -67,8 +69,8 @@ RUN mkdir -p $NVM_DIR && \
|
|||
USER root
|
||||
|
||||
# Reload the env everytime a new shell is opened incase the .env file changed.
|
||||
RUN echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
|
||||
echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
|
||||
RUN echo "source ${KBN_DIR}/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
|
||||
echo "source ${KBN_DIR}/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
|
||||
|
||||
# This is for documentation. Ports are exposed via devcontainer.json
|
||||
EXPOSE 9200 5601 9229 9230 9231
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
"name": "Kibana",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"context": ".."
|
||||
"context": "..",
|
||||
"args": {
|
||||
"KBN_DIR": "${containerWorkspaceFolder}"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue