Skip to content

Commit c2c11f2

Browse files
committed
pass workspace as build arg
1 parent dffe0b5 commit c2c11f2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
22

3+
ARG KBN_DIR
4+
35
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
46
ENV HOME=/home/vscode
57
ENV NVM_DIR=${HOME}/nvm
@@ -67,8 +69,8 @@ RUN mkdir -p $NVM_DIR && \
6769
USER root
6870

6971
# Reload the env everytime a new shell is opened incase the .env file changed.
70-
RUN echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
71-
echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
72+
RUN echo "source ${KBN_DIR}/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
73+
echo "source ${KBN_DIR}/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
7274

7375
# This is for documentation. Ports are exposed via devcontainer.json
7476
EXPOSE 9200 5601 9229 9230 9231

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "Kibana",
33
"build": {
44
"dockerfile": "Dockerfile",
5-
"context": ".."
5+
"context": "..",
6+
"args": {
7+
"KBN_DIR": "${containerWorkspaceFolder}"
8+
}
69
},
710
"customizations": {
811
"vscode": {

0 commit comments

Comments
 (0)