-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
59 lines (52 loc) · 1.56 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:latest
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git \
python \
python-pip \
software-properties-common \
sudo \
curl \
man \
locales-all \
net-tools \
dnsutils \
iproute2 \
iputils-ping && \
rm -Rf /var/lib/apt/lists/* && \
apt-get clean && \
apt-get autoremove -y
# Add jbeda as user
RUN useradd --user-group \
--create-home \
--shell /bin/bash \
jbeda && \
echo 'jbeda ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Switch to damon user and /home/damon directory
USER jbeda
ENV HOME /home/jbeda
WORKDIR /home/jbeda
# RUN mkdir src && cd src && \
# git clone git://github.com/jbeda/dotfiles.git && \
# cd dotfiles && \
# ./install
# RUN git config --global --unset 'url.git@github.com:.insteadof' && \
# cd src/dotfiles && \
# git submodule init && \
# git submodule update
# Download and install Go. GOROOT and GOPATH will be set in dot files
ENV GO_VERSION=1.7.3
RUN curl -LO https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
tar xzf go${GO_VERSION}.linux-amd64.tar.gz && \
mv go goroot && \
rm go${GO_VERSION}.linux-amd64.tar.gz && \
mkdir -p src/go/bin
COPY . /home/jbeda/src/dotfiles
RUN mkdir .ssh && \
sudo chown -R jbeda.jbeda /home/jbeda && \
cd src/dotfiles && \
./install
ENTRYPOINT ["/bin/bash"]
CMD ["--login"]