24 lines
640 B
Text
24 lines
640 B
Text
FROM debian:stable-slim
|
|
MAINTAINER Juno Takano juno@jutty.dev
|
|
ENV DEBUG=debug
|
|
ENV TAG=${TAG:-latest}
|
|
|
|
# Setup tooling
|
|
RUN apt-get -y --update install --no-install-recommends \
|
|
curl ca-certificates gcc libc6-dev git file
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
# Install
|
|
RUN git clone -b "$TAG" --single-branch https://codeberg.org/jutty/en /build
|
|
RUN <<EOF
|
|
cd /build && /root/.cargo/bin/cargo build --locked --release
|
|
mv /build/target/release/en /usr/local/bin/en
|
|
rm -rf /build
|
|
EOF
|
|
|
|
# Describe
|
|
RUN file $(which en) && sha256sum $(which en)
|
|
|
|
# Launch
|
|
WORKDIR /root
|
|
CMD ["en", "-p", "80"]
|