| # debian.sh --arch 'amd64' out/ 'trixie' '@1791158400' |
| RUN /bin/sh -c apt-get update -qq && apt-get install -qq --no-install-recommends ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit |
| COPY docker-entrypoint.sh /usr/local/bin # buildkit |
| COPY /usr/local/bin/bun /usr/local/bin/bun # buildkit |
| RUN /bin/sh -c mkdir -p /usr/local/bun-node-fallback-bin && ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node # buildkit |
| ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bun-node-fallback-bin |
| ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 |
| ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 |
| ARG BUN_INSTALL_BIN=/usr/local/bin |
| ENV BUN_INSTALL_BIN=/usr/local/bin |
| RUN |2 BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 BUN_INSTALL_BIN=/usr/local/bin /bin/sh -c groupadd bun --gid 1000 && useradd bun --uid 1000 --gid bun --shell /bin/sh --create-home && ln -s /usr/local/bin/bun /usr/local/bin/bunx && which bun && which bunx && bun --version # buildkit |
| WORKDIR /home/bun/app |
| ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] |
| CMD ["/usr/local/bin/bun"] |
| RUN /bin/sh -c apt update && apt install -y iputils-ping # buildkit |
| WORKDIR /app |
| LABEL org.opencontainers.image.title=wstunnel org.opencontainers.image.description=TCP tunnel mesh with encrypted YAML management over the web API. Start with WSTUNNEL_PORT, WSTUNNEL_API_KEY and WSTUNNEL_RUNNER_ID; persist /app/data for restart recovery. org.opencontainers.image.url=https://gitea.root.sarava.dev/infrava/wstunnel org.opencontainers.image.source=https://gitea.root.sarava.dev/infrava/wstunnel org.opencontainers.image.documentation=https://gitea.root.sarava.dev/infrava/wstunnel/src/branch/master/enduserExperiment/docker-two-servers.md |
| ENV NODE_ENV=production |
| COPY /app/node_modules ./node_modules # buildkit |
| COPY package.json bun.lock .bun-version ./ # buildkit |
| COPY src ./src # buildkit |
| COPY docker/healthcheck.ts ./docker/healthcheck.ts # buildkit |
| RUN /bin/sh -c mkdir -p /app/data && chown bun:bun /app/data && chmod 0700 /app/data # buildkit |
| USER bun |
| EXPOSE [8191/tcp] |
| STOPSIGNAL SIGTERM |
| HEALTHCHECK {Test:[CMD bun /app/docker/healthcheck.ts] Interval:30s Timeout:5s StartPeriod:15s StartInterval:0s Retries:3} |
| ENTRYPOINT ["bun" "/app/src/main.ts"] |