Created
May 26, 2023 13:35
-
-
Save zokier/fd074546be2c614f98d02ba062c000d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$#" = "0" ]; then | |
echo "Commands: " | |
ls -1 /wuffs | sed 's/^example-//' | |
exit 1 | |
fi | |
CMD="$1" | |
shift | |
exec "/wuffs/example-$CMD" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stable-slim AS builder | |
RUN APT_FRONTEND=non-interactive apt-get update && apt-get install -y curl \ | |
&& curl -sSL -o /tmp/go.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz \ | |
&& tar -C /usr/local -xzf /tmp/go.tar.gz | |
ENV PATH $PATH:/usr/local/go/bin:/root/go/bin | |
ENV CGO_ENABLED 1 | |
RUN APT_FRONTEND=non-interactive apt-get install -y build-essential pkg-config clang \ | |
liblz4-dev zlib1g-dev libzstd-dev libdeflate-dev libpng-dev libgif-dev libbz2-dev \ | |
libxcb-render0-dev libxcb-render-util0-dev libxcb-image0-dev libxcb1-dev \ | |
libsdl2-dev libsdl2-image-dev | |
RUN mkdir /wuffs | |
WORKDIR /wuffs | |
COPY . /wuffs/ | |
RUN ./build-all.sh | |
FROM debian:stable-slim | |
RUN mkdir /wuffs | |
COPY --from=builder /wuffs/gen/bin/example-* /wuffs/ | |
COPY --chmod=755 docker-entrypoint.sh / | |
ENTRYPOINT [ "/docker-entrypoint.sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment