FROM alpine:3.21.3 EXPOSE 443 # install curl RUN apk update RUN apk add curl RUN apk fix # install nginx RUN printf "%s%s%s%s\n" \ "@nginx " \ "http://nginx.org/packages/alpine/v" \ `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \ "/main" \ | tee -a /etc/apk/repositories RUN curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub RUN mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/ RUN apk update RUN apk add nginx@nginx mysql-client RUN apk fix # add config RUN rm /etc/nginx/nginx.conf COPY conf/ /etc/nginx/ # start CMD ["nginx", "-g", "daemon off;"] HEALTHCHECK --interval=1s --timeout=10s --start-period=60s --retries=1 CMD [ "sh", "-c", "! [ -z \"$(netstat -tuln | grep :443)\" ]" ]