Skip to content

Commit f6a9b25

Browse files
authored
Update Dockerfile
1 parent 28ed8c0 commit f6a9b25

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

Dockerfile

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ RUN sudo apt-get install -y build-essential libssl-dev
6767
RUN sudo apt-get install -y wget unzip fontconfig
6868
RUN sudo apt-get install -y inotify-tools
6969

70+
# Setup NVM:
71+
# Create a script file sourced by both interactive and non-interactive bash shells
72+
ENV BASH_ENV /home/user/.bash_env
73+
# Setup NVM:
74+
ENV NVM_DIR /usr/local/nvm
75+
ENV NODE_VERSION --lts
76+
RUN touch "${BASH_ENV}"
77+
RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
78+
79+
# Download and install nvm
80+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | PROFILE="${BASH_ENV}" bash
81+
RUN echo node > .nvmrc
82+
RUN nvm install
83+
7084
# Setup shell w/ powerline10k theme, no zsh plugins installed
7185
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)"
7286
# Change the default shell for "coder" to zsh
@@ -77,13 +91,13 @@ COPY --chown=coder:coder .zshrc /home/coder/.zshrc
7791
COPY --chown=coder:coder .p10k.zsh /home/coder/.p10k.zsh
7892

7993
# Setup NVM:
80-
ENV NVM_DIR /usr/local/nvm
81-
ENV NODE_VERSION --lts
82-
RUN sudo mkdir -p /usr/local/nvm
83-
RUN sudo chown -R coder:coder /usr/local/nvm
84-
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
85-
ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
86-
ENV PATH $NODE_PATH:$PATH
94+
#ENV NVM_DIR /usr/local/nvm
95+
#ENV NODE_VERSION --lts
96+
#RUN sudo mkdir -p /usr/local/nvm
97+
#RUN sudo chown -R coder:coder /usr/local/nvm
98+
#RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
99+
#ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
100+
#ENV PATH $NODE_PATH:$PATH
87101

88102
# Fetch the latest Geist font release
89103
RUN LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/vercel/geist-font/releases/latest | grep "browser_download_url" | grep ".zip" | cut -d '"' -f 4 | grep Mono) \
@@ -98,11 +112,22 @@ RUN pwd
98112
RUN sudo mkdir -p /usr/share/fonts/truetype/geist-font
99113
RUN sudo find geist-font/ -type f -name '*.ttf' -exec cp '{}' /usr/share/fonts/truetype/geist-font/ ';'
100114

115+
# Install Meslo fonts for p10k
116+
RUN wget -O https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
117+
RUN wget -O https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
118+
RUN wget -O https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
119+
RUN wget -O https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
120+
121+
# Install the fonts to the system fonts directory
122+
RUN sudo mkdir -p /usr/share/fonts/truetype/meslolgs
123+
RUN sudo find ./ -type f -name '*.ttf' -exec cp '{}' /usr/share/fonts/truetype/meslolgs/ ';'
124+
101125
# Update the font cache
102126
RUN sudo fc-cache -fv
103127

104128
# Cleanup unnecessary files
105129
RUN sudo rm -rf geist-font.zip geist-font
130+
RUN sudo rm *.ttf
106131

107132
# Set env vars before boot
108133
ENV PORT=8080

0 commit comments

Comments
 (0)