Older/Dockerfiles/ubuntu2404_pure.dockerfile

28 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2024-11-01 10:03:07 +08:00
FROM ubuntu:24.04
LABEL maintainer="amass <168062547@qq.com>"
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
&& apt update \
&& apt install -y tini openssh-server
RUN mkdir /var/run/sshd \
&& sed -i 's/#Port 22/Port 5022/' /etc/ssh/sshd_config \
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config \
&& mkdir -p /root/.ssh \
&& wget https://frp-by1.wwvvww.cn:44048/s/id_ed25519/download -O /root/.ssh/authorized_keys \
&& chmod 600 /root/.ssh/authorized_keys && chown root:root /root/.ssh/authorized_keys
EXPOSE 5022
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV TERM=xterm-256color
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["service", "ssh", "start", "-D"]
# docker build --progress=tty -f ubuntu2404_pure.dockerfile -t frp-by1.wwvvww.cn:45288/ubuntu_pure:24.04 .
# docker push frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04
# docker run -it -d --rm --network host --name develop frp-by1.wwvvww.cn:45288/ubuntu_pure:24.04