Skip to content

Commit 5d5ac4f

Browse files
committed
install pants inside devcontainer and add postcreatecommand
1 parent e489fcb commit 5d5ac4f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"target": "/var/run/docker.sock",
4343
"type": "bind"
4444
}
45-
]
45+
],
46+
"postCreateCommand": "pants run cmd/greeter_en"
4647
}

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ RUN apt-get update && \
66
zsh \
77
&& rm -rf /var/lib/apt/lists/*
88
# install just
9-
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
10-
# setup zsh and oh-my-zsh
11-
RUN git clone --single-branch --depth 1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
12-
RUN cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
13-
RUN chsh -s /bin/zsh
9+
# install Pants
10+
COPY get-pants.sh /tmp/get-pants.sh
11+
RUN bash /tmp/get-pants.sh --bin-dir /usr/local/bin && \
12+
export PATH="/usr/local/bin:$PATH" && \
13+
git clone --single-branch --depth 1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh && \
14+
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc && \
15+
chsh -s /bin/zsh
1416
CMD [ "/bin/zsh" ]

0 commit comments

Comments
 (0)