36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
FROM ubuntu:22.04
|
|
|
|
# Prevent interactive prompts during package installation
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Configure apt to be faster and more reliable
|
|
RUN echo 'Acquire::http::Timeout "30";' > /etc/apt/apt.conf.d/99timeout && \
|
|
echo 'Acquire::Retries "3";' >> /etc/apt/apt.conf.d/99timeout && \
|
|
echo 'Acquire::http::Pipeline-Depth "0";' >> /etc/apt/apt.conf.d/99timeout
|
|
|
|
# Update package lists and install packages in a single layer for better caching
|
|
# Use --no-install-recommends to reduce image size and installation time
|
|
# Group packages to optimize download
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
openssh-client \
|
|
wireguard-tools \
|
|
curl \
|
|
wget \
|
|
dnsutils \
|
|
iptables \
|
|
bash \
|
|
samba-client \
|
|
nginx-light \
|
|
iproute2 \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& mkdir -p /var/log/nginx /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled \
|
|
&& chown -R www-data:www-data /var/www/html /var/log/nginx 2>/dev/null || true
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["/bin/bash"]
|