Skip to content

Commit 990d0db

Browse files
authored
Add codespaces config
1 parent ca20dae commit 990d0db

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:18.04
2+
3+
WORKDIR /home/
4+
5+
COPY . .
6+
7+
RUN bash ./setup.sh
8+
9+
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.zshrc"
10+
RUN echo '\n' >> "$HOME/.zshrc"
11+
RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.zshrc"

.devcontainer/devcontainer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"dockerFile": "Dockerfile",
3+
"settings": {
4+
"terminal.integrated.shell.linux": "/usr/bin/zsh",
5+
}
6+
}

.devcontainer/setup.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## update and install some things we should probably have
2+
apt-get update
3+
apt-get install -y \
4+
curl \
5+
git \
6+
gnupg2 \
7+
jq \
8+
sudo \
9+
zsh
10+
11+
# set-up and install yarn
12+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
13+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
14+
apt-get update && apt-get install yarn -y
15+
apt-get install htop neofetch -y
16+
17+
# install nvm
18+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
19+
nvm i 16
20+
nvm alias default 16
21+
22+
# setup and install oh-my-zsh
23+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
24+
cp -R /root/.oh-my-zsh /home/$USERNAME
25+
cp /root/.zshrc /home/$USERNAME
26+
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/$USERNAME\/.oh-my-zsh/g" /home/$USERNAME/.zshrc
27+
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc

0 commit comments

Comments
 (0)