test: switch to Ubuntu for now

We can't use Alpine because we can't yet compile for musl.
This commit is contained in:
Mitchell Hashimoto
2022-07-18 08:08:17 -07:00
parent ad2a795b9d
commit 6812f3f54a
4 changed files with 41 additions and 32 deletions

View File

@ -1,45 +1,48 @@
#--------------------------------------------------------------------
# vttest
# Alacritty since it has no build in Ubuntu
#--------------------------------------------------------------------
FROM alpine:3.16 AS vttest
FROM rust AS alacritty
RUN apk add --no-cache build-base curl
RUN apt-get update && apt-get install -y \
cmake pkg-config libfreetype6-dev libfontconfig1-dev \
libxcb-xfixes0-dev python3 git
RUN curl -o vttest.tar.gz https://invisible-island.net/archives/vttest/vttest-20220215.tgz && \
tar xvzf vttest.tar.gz && \
cd vttest-20220215 && \
./configure && \
make && \
cp ./vttest /
RUN git clone https://github.com/alacritty/alacritty.git /tmp/alacritty
WORKDIR /tmp/alacritty
RUN git checkout tags/$(git describe --tags $(git rev-list --tags --max-count=1))
RUN RUSTFLAGS='-C link-arg=-s' cargo build --release
#--------------------------------------------------------------------
# main runner
# Main Runner
#--------------------------------------------------------------------
FROM alpine:3.16
# Note: we used to use Alpine, but we need to use an OS that is more
# glibc friendly because on Linux we still require glibc (active todo to
# support musl).
FROM ubuntu:22.04
# Base packages. A good set of this is just to get X (xvfb) and OpenGL
# software rendering working (all the mesa drivers).
RUN apk add --no-cache \
bash \
grep \
procps \
font-inconsolata-nerd \
i3wm \
# Base deps
RUN apt-get update && apt-get install -y \
fonts-inconsolata \
i3 \
imagemagick \
libxrandr \
mesa-dev \
mesa-dri-gallium \
mesa-gl \
libgl1-mesa-dev \
libxcursor1 \
patchelf \
software-properties-common \
xdotool \
xvfb \
xvfb-run \
xdotool
vttest
# Our terminals
RUN apk add --no-cache \
alacritty \
# Terminals
RUN apt-get install -y \
xterm
COPY --from=vttest /vttest /usr/bin/vttest
RUN rm -rf /var/lib/apt/lists/*
COPY --from=alacritty /tmp/alacritty/target/release/alacritty /usr/bin/alacritty
COPY ./run.sh /entrypoint.sh

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -55,8 +55,14 @@ fi
echo "Term: ${ARG_EXEC}"
echo "Case: ${ARG_CASE}"
# NOTE: This is a huge hack right now.
if [ "$ARG_EXEC" = "ghostty" ]; then
ARG_EXEC="/src/ghostty";
# We build in Nix (maybe). To be sure, we replace the interpreter so
# it doesn't point to a Nix path. If we don't build in Nix, this should
# still be safe.
patchelf --set-interpreter /lib/ld-linux-$(uname -m).so.1 ${ARG_EXEC}
fi
#--------------------------------------------------------------------