Add dev containers, musl build
This commit is contained in:
parent
23cd51fc95
commit
1748dd2fb6
11 changed files with 115 additions and 49 deletions
|
|
@ -1,23 +0,0 @@
|
|||
FROM alpine:latest
|
||||
MAINTAINER Juno Takano juno@jutty.dev
|
||||
ENV DEBUG=debug
|
||||
ENV TAG=${TAG:-latest}
|
||||
|
||||
# Setup tooling
|
||||
RUN apk add curl clang 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"]
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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"]
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
## Known issues
|
||||
- Containers will halt and fail to respond to requests with `ERR_CONNECTION_RESET` if the working directory is `/`
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
set -eu
|
||||
distro="$1"
|
||||
|
||||
podman stop --time 3 "en-$distro"
|
||||
podman build \
|
||||
--tag "en-$distro" \
|
||||
-f "Containerfile.$distro"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
set -eu
|
||||
distro="$1"
|
||||
|
||||
podman run \
|
||||
--replace \
|
||||
--name "en-$distro" \
|
||||
--publish 3008:80 \
|
||||
"en-$distro"
|
||||
Loading…
Add table
Add a link
Reference in a new issue