This repository has been archived by the owner on Oct 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
42 lines (34 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM jcscottiii/base-gui-gdec:latest
MAINTAINER James C. Scott III <[email protected]>
# Change to root to install more dependencies
USER root
# Make sure to download newer version of node than what is the default in apt-get
# Install other dependencies
RUN apt-get install -y \
curl=7.35.0-1ubuntu2.5
RUN curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
RUN apt-get install -y \
nodejs=5.1.1-1nodesource1~trusty1 \
zip=3.0-8
RUN apt-get clean
# Change back to non-root user
USER $USERNAME
# Switch npm prefix to prevent using sudo.
RUN mkdir $HOME/.npm-global
ENV NPM_CONFIG_PREFIX $HOME/.npm-global
ENV PATH $HOME/.npm-global/bin:$PATH
# Install VSCode
RUN wget -O $HOME/VSCode.zip 'https://az764295.vo.msecnd.net/public/0.10.3/VSCode-linux64.zip'
RUN unzip $HOME/VSCode.zip -d $HOME/vscode/
RUN ln -s $HOME/vscode/VSCode-linux-x64/Code $HOME/bin/code
# Install vsce, the Visual Studio Extension Manager
RUN npm install -g vsce
# Install the vscode-go extension
RUN git clone https://github.com/Microsoft/vscode-go $HOME/.vscode/extensions/lukehoban.Go && cd $HOME/.vscode/extensions/lukehoban.Go && git checkout tags/0.6.17 && npm install && vsce package
# Add settings.json file that contains settings for the go extension
RUN mkdir -p $HOME/.config/Code/User/
ADD settings.json $HOME/.config/Code/User/settings.json
# Move back to root for the su in entry.sh
USER root
# chown the settings.json file to the non-root user
RUN chown -R $USERNAME:$USERNAME $HOME/.config/Code/User/settings.json