forked from ctaggart/golang-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 882 Bytes
/
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
# https://github.com/ctaggart/golang-vscode
# https://hub.docker.com/r/ctaggart/golang-vscode/
# https://golang.org/
# https://hub.docker.com/_/golang/
# https://github.com/docker-library/golang
FROM golang:latest
COPY root /root
ENV DEBIAN_FRONTEND noninteractive
# for development
# ip=`ifconfig bridge100 | grep inet | awk '$1=="inet" {print $2}'`
# docker run --rm -it -v $PWD/root:/root -w /root -e DISPLAY=$ip:0 golang:latest
RUN cd /root \
&& ./install-apt-packages.sh \
&& useradd -m vscode -s /bin/bash \
&& mkdir -p /home/vscode/go \
&& chown vscode:vscode /home/vscode/go \
&& mkdir -p /home/vscode/dev \
&& chown vscode:vscode /home/vscode/dev
COPY --chown=vscode:vscode user/terminator.config /home/vscode/.config/terminator/config
COPY --chown=vscode:vscode user/bash_profile /home/vscode/.bash_profile
WORKDIR /root
CMD su - vscode -c "code -w ."