-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_zzj
29 lines (23 loc) · 1.01 KB
/
Dockerfile_zzj
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
FROM resin/rpi-raspbian:latest
RUN sh -c "echo 'deb http://ppa.launchpad.net/aziotsdklinux/ppa-azureiot/ubuntu vivid main' >> /etc/apt/sources.list"
RUN sh -c "echo 'deb-src http://ppa.launchpad.net/aziotsdklinux/ppa-azureiot/ubuntu vivid main' >> /etc/apt/sources.list"
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA6A393E4C2257F
RUN apt-get -y update && apt-get install -y \
azure-iot-sdk-c-dev \
build-essential \
cmake \
git \
wiringpi \
openssh-server \
gdb
# SSH login fix. Otherwise user is kicked off after login
RUN mkdir /var/run/sshd
RUN chmod 0755 /var/run/sshd
RUN echo 'root:raspberry' | chpasswd \
&& sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config \
&& sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]