forked from snowdreamtech/ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
88 lines (80 loc) · 4.1 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM nvcr.io/nvidia/deepstream:7.1-triton-multiarch
# OCI annotations to image
LABEL org.opencontainers.image.authors="Snowdream Tech" \
org.opencontainers.image.title="Ubuntu Base Image" \
org.opencontainers.image.description="Docker Images for nvidia/deepstream. (amd64, arm64)" \
org.opencontainers.image.documentation="https://hub.docker.com/r/snowdreamtech/nvidia-deepstream" \
org.opencontainers.image.base.name="snowdreamtech/nvidia-deepstream:latest" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/snowdreamtech/nvidia-deepstream" \
org.opencontainers.image.vendor="Snowdream Tech" \
org.opencontainers.image.version="7.1-triton-multiarch" \
org.opencontainers.image.url="https://github.com/snowdreamtech/nvidia-deepstream"
ENV DEBIAN_FRONTEND=noninteractive \
# keep the docker container running
KEEPALIVE=0 \
# Ensure the container exec commands handle range of utf8 characters based of
# default locales in base image (https://github.com/docker-library/docs/tree/master/ubuntu#locales)
LANG=C.UTF-8 \
SSH_ROOT_PASSWORD=
RUN set -eux \
&& apt-get -qqy update \
&& apt-get -qqy install --no-install-recommends \
procps \
sudo \
vim \
unzip \
tzdata \
openssl \
wget \
curl \
iputils-ping \
lsof \
apt-transport-https \
ca-certificates \
&& update-ca-certificates\
&& apt-get -qqy --purge autoremove \
&& apt-get -qqy clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/* \
&& echo 'export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"' >> /etc/bash.bashrc
RUN set -eux \
&& apt-get -qqy update \
&& apt-get -qqy install --no-install-recommends \
xauth \
x11-apps \
openssh-server \
openssh-sftp-server \
openssh-client \
&& mkdir -p /run/sshd \
&& sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config \
&& sed -i "s/^#PasswordAuthentication/PasswordAuthentication/g" /etc/ssh/sshd_config \
&& sed -i "s/^#PermitEmptyPasswords/PermitEmptyPasswords/g" /etc/ssh/sshd_config \
&& sed -i "s/^#HostKey/HostKey/g" /etc/ssh/sshd_config \
&& sed -i "s/^#PubkeyAuthentication/PubkeyAuthentication/g" /etc/ssh/sshd_config \
&& sed -i "s/^#IgnoreRhosts/IgnoreRhosts/g" /etc/ssh/sshd_config \
&& sed -i "s/^#StrictModes/StrictModes/g" /etc/ssh/sshd_config \
&& sed -i "s/#MaxAuthTries.*/MaxAuthTries 7/g" /etc/ssh/sshd_config \
&& sed -i "s/#MaxSessions.*/MaxSessions 10/g" /etc/ssh/sshd_config \
&& sed -i "s/#ClientAliveInterval.*/ClientAliveInterval 900/g" /etc/ssh/sshd_config \
&& sed -i "s/#ClientAliveCountMax.*/ClientAliveCountMax 0/g" /etc/ssh/sshd_config \
&& sed -i "s/Subsystem.*/Subsystem\tsftp\tinternal-sftp/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?AllowAgentForwarding.*/AllowAgentForwarding yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?AllowTcpForwarding.*/AllowTcpForwarding yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?AllowTcpForwarding.*/AllowTcpForwarding yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?GatewayPorts.*/GatewayPorts yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?X11Forwarding.*/X11Forwarding yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?X11DisplayOffset.*/X11DisplayOffset 10/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?X11UseLocalhost.*/X11UseLocalhost yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?PermitTTY.*/PermitTTY yes/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?PrintMotd.*/PrintMotd no/g" /etc/ssh/sshd_config \
&& sed -i -E "s/#?PrintLastLog.*/PrintLastLog yes/g" /etc/ssh/sshd_config \
&& apt-get -qqy --purge autoremove \
&& apt-get -qqy clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*
COPY vimrc.local /etc/vim/vimrc.local
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]