-
-
Notifications
You must be signed in to change notification settings - Fork 182
/
Dockerfile.aarch64
41 lines (35 loc) · 1.24 KB
/
Dockerfile.aarch64
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
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
# set version label
ARG BUILD_DATE
ARG VERSION
ARG OPENSSH_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
logrotate \
nano \
netcat-openbsd \
sudo && \
echo "**** install openssh-server ****" && \
if [ -z ${OPENSSH_RELEASE+x} ]; then \
OPENSSH_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && \
awk '/^P:openssh-server-pam$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \
openssh-client==${OPENSSH_RELEASE} \
openssh-server-pam==${OPENSSH_RELEASE} \
openssh-sftp-server==${OPENSSH_RELEASE} && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** setup openssh environment ****" && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config && \
usermod --shell /bin/bash abc && \
rm -rf \
/tmp/* \
$HOME/.cache
# add local files
COPY /root /
EXPOSE 2222
VOLUME /config