-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (53 loc) · 1.65 KB
/
Dockerfile
File metadata and controls
60 lines (53 loc) · 1.65 KB
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
60
# ref: https://github.com/the-redback/dotfiles/blob/master/Dockerfile
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 redback as user
RUN useradd --user-group \
--create-home \
--shell /bin/bash \
redback && \
echo 'redback ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Switch to damon user and /home/damon directory
USER redback
ENV HOME /home/redback
WORKDIR /home/redback
# RUN mkdir src && cd src && \
# git clone git://github.com/redback/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/redback/src/dotfiles
RUN mkdir .ssh && \
sudo chown -R redback.redback /home/redback && \
cd src/dotfiles && \
./install
ENTRYPOINT ["/bin/bash"]
CMD ["--login"]