| # debian.sh --arch 'amd64' out/ 'bookworm' '@1779062400' |
| ARG TYPST_VERSION=0.14.2 |
| RUN |1 TYPST_VERSION=0.14.2 /bin/sh -c apt-get update -y && apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates curl xz-utils && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen && ARCH="$(uname -m)" && case "$ARCH" in x86_64) TYPST_ARCH="x86_64-unknown-linux-musl" ;; aarch64) TYPST_ARCH="aarch64-unknown-linux-musl" ;; *) echo "unsupported arch: $ARCH" && exit 1 ;; esac && curl -fsSL "https://github.com/typst/typst/releases/download/v${TYPST_VERSION}/typst-${TYPST_ARCH}.tar.xz" -o /tmp/typst.tar.xz && tar -xf /tmp/typst.tar.xz -C /tmp && mv "/tmp/typst-${TYPST_ARCH}/typst" /usr/local/bin/typst && rm -rf /tmp/typst.tar.xz "/tmp/typst-${TYPST_ARCH}" && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit |
| ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 |
| WORKDIR /app |
| RUN |1 TYPST_VERSION=0.14.2 /bin/sh -c groupadd --gid 1000 app && useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash app # buildkit |
| COPY --chown=app:app /app/_build/prod/rel/taxes_web ./ # buildkit |
| COPY --chown=app:app scripts/entrypoint.sh /entrypoint.sh # buildkit |
| RUN |1 TYPST_VERSION=0.14.2 /bin/sh -c chmod +x /entrypoint.sh # buildkit |
| USER app |
| ENV PHX_SERVER=true |
| ENV PORT=4000 |
| EXPOSE map[4000/tcp:{}] |
| HEALTHCHECK &{["CMD-SHELL" "curl -fsS http://localhost:4000/ >/dev/null || exit 1"] "30s" "5s" "30s" "0s" '\x03'} |
| ENTRYPOINT ["/entrypoint.sh"] |
| CMD ["bin/taxes_web" "start"] |