java-images/21/Dockerfile

44 lines
1.5 KiB
Docker

FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:21-jdk-noble
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
LABEL org.opencontainers.image.licenses=MIT
RUN apt update -y
RUN apt install -y curl
RUN apt install -y lsof
RUN apt install -y ca-certificates
RUN apt install -y openssl
RUN apt install -y git
RUN apt install -y tar
RUN apt install -y sqlite3
RUN apt install -y fontconfig
RUN apt install -y tzdata
RUN apt install -y iproute2
RUN apt install -y libfreetype6
RUN apt install -y tini
RUN apt install -y zip
RUN apt install -y unzip
RUN apt install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
RUN echo 'root:password' | chpasswd
RUN sed -i 's/#Port 22/Port 40038/' /etc/ssh/sshd_config
RUN useradd -m -d /home/container -s /bin/bash container
ENV USER=container HOME=/home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN echo '#!/bin/bash\n/usr/sbin/sshd\nsu container -c "/entrypoint.sh"' > /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/start.sh"]