ARG ALPINE_VERSION=3.19 ARG LYREBIRD_VERSION=0.2.0 ARG NODE_VERSION=20 # Get Dockerfile cross-compilation helpers. FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS node ARG TARGETPLATFORM ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone COPY --from=xx / / RUN xx-apk update && xx-apk upgrade && xx-apk add -U --no-cache \ iptables net-tools \ screen logrotate bash \ wireguard-tools \ dnsmasq \ tor \ && xx-verify \ /bin/bash \ /usr/bin/tor \ /usr/sbin/dnsmasq \ /usr/local/bin/node \ /usr/sbin/logrotate \ && rm -rf /var/cache/apk/* FROM --platform=${BUILDPLATFORM} golang:alpine AS pluggables ARG TARGETPLATFORM ARG LYREBIRD_VERSION COPY --from=xx / / RUN xx-apk update && xx-apk upgrade && xx-apk add -U --no-cache \ bash \ make \ && rm -rf /var/cache/apk/* SHELL ["/bin/bash", "-c"] RUN </etc/crontabs/root # Setup entrypoint COPY docker-entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] # Volumes VOLUME ["/etc/tor", "/var/lib/tor", "/data"] # Run the app EXPOSE 3000/tcp CMD [ "node", "/app/build/index.js" ]