-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (45 loc) · 1.24 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
# sshd
FROM ubuntu:16.04
MAINTAINER Chetan Gowda <[email protected]>
### install required packages ###
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
#git \
#python \
#curl \
ca-certificates
#vim-nox \
#vim \
#openssh-server \
#mosh \
#sudo \
#ctags
RUN mkdir -p /usr/sbin/
COPY ./DyconfDaemon /usr/sbin/
### ssh stuff
#RUN mkdir /var/run/sshd
#RUN set -i 's/Port 22/Port 2222/' /etc/ssh/sshd_config
#RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
#RUN sed -i 's/^X11Forwarding yes/X11Forwarding no/' /etc/ssh/sshd_config
#RUN sed -i 's/^LogLevel INFO/LogLevel VERBOSE/' /etc/ssh/sshd_config
### add user ###
RUN useradd chetan \
--uid 1000 \
--home-dir /home/chetan \
--no-create-home \
--groups sudo \
--shell /bin/bash
RUN echo "chetan:chetan" | chpasswd
RUN mkdir -p /home/chetan
#WORKDIR /home/chetan
### Install Go ###
#RUN curl https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz -o /tmp/go.tar.gz
#RUN tar -C /usr/local -xzf /tmp/go.tar.gz
### Environment variables ###
#ENV GOPATH /home/chetan/go
#ENV PATH $GOPATH/bin/:$PATH:/usr/local/go/bin/
### Volumes ###
VOLUME /home/chetan
### expose port ###
EXPOSE 9009
#CMD ["/usr/sbin/sshd", "-D"]