# gitzone dockerfile_service ## STAGE 1 // BUILD FROM code.foss.global/host.today/ht-docker-node:lts AS build WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN pnpm config set store-dir .pnpm-store RUN pnpm config set registry https://verdaccio.lossless.digital RUN pnpm install --frozen-lockfile COPY . ./ # The npm package builds both Rust targets; each OCI image only needs its native binary. RUN node -e "const fs=require('node:fs');const p='.smartconfig.json';const c=JSON.parse(fs.readFileSync(p,'utf8'));c['@git.zone/tsrust']={...(c['@git.zone/tsrust']||{}),targets:[]};fs.writeFileSync(p,JSON.stringify(c));" \ && pnpm exec tsbuild tsfolders --allowimplicitany \ && pnpm exec tsrust RUN rm -rf .pnpm-store RUN pnpm prune --prod ## STAGE 2 // PRODUCTION FROM code.foss.global/host.today/ht-docker-node:alpine-node AS production WORKDIR /app ENV NODE_ENV=production COPY --from=build /app/package.json ./package.json COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/cli.js ./cli.js COPY --from=build /app/dist_ts ./dist_ts COPY --from=build /app/dist_rust ./dist_rust LABEL org.opencontainers.image.title="remoteingress" \ org.opencontainers.image.description="serve.zone edge ingress tunnel" \ org.opencontainers.image.source="https://code.foss.global/serve.zone/remoteingress" EXPOSE 80 443 8443 53/udp CMD ["node", "cli.js"]