-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdev.Containerfile
More file actions
61 lines (54 loc) · 2.75 KB
/
Copy pathdev.Containerfile
File metadata and controls
61 lines (54 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# BAR development environment — canonical system dependency list.
FROM registry.fedoraproject.org/fedora:43
RUN dnf install -y --setopt=install_weak_deps=False \
compat-lua compat-lua-devel readline-devel \
nodejs npm \
rust cargo \
clang-tools-extra cmake \
just \
gcc gcc-c++ make git curl jq unzip binutils \
gawk \
gpgme \
python3-tkinter python3-requests python3-six \
SDL2-devel DevIL-devel glew-devel openal-soft-devel \
libvorbis-devel freetype-devel fontconfig-devel \
libunwind-devel libcurl-devel jsoncpp-devel minizip-devel \
expat-devel libXcursor-devel p7zip \
&& dnf clean all \
&& ln -s /usr/bin/lua-5.1 /usr/local/bin/lua
# cargo-binstall bootstrap (Fedora ships neither it nor a binstall-capable cargo).
RUN curl -L --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh \
| bash
# Keep in lockstep with .github/workflows/test_unit.yml in the BAR repo.
ARG LUX_VERSION=0.28.3
RUN /root/.cargo/bin/cargo-binstall --no-confirm \
${LUX_VERSION:+--version $LUX_VERSION} \
--install-path /usr/local/bin \
lux-cli \
&& mv /root/.cargo/bin/cargo-binstall /usr/local/bin/ \
&& rm -rf /root/.cargo
# No `lx install-lua`: lux uses the system Lua 5.1, which has dlopen so C rocks
# build and load; install-lua's own Lua lacks dlopen. Mirrors BAR's CI.
# stylua direct, not `lx install`: lux's tool runner only resolves src/ layouts.
# Track: https://github.com/lumen-oss/lux/issues/953
ARG STYLUA_VERSION=2.0.2
RUN ARCH=$(uname -m) \
&& case "$ARCH" in x86_64) PLAT=linux-x86_64;; aarch64) PLAT=linux-aarch64;; esac \
&& curl -fsSL "https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${PLAT}.zip" \
-o /tmp/stylua.zip \
&& unzip -o /tmp/stylua.zip -d /usr/local/bin \
&& chmod +x /usr/local/bin/stylua \
&& rm /tmp/stylua.zip
ARG EMMYLUA_VERSION=0.22.0
RUN ARCH=$(uname -m) \
&& case "$ARCH" in \
x86_64) LS_ASSET="emmylua_ls-linux-x64.tar.gz"; CHECK_ASSET="emmylua_check-linux-x64.tar.gz" ;; \
aarch64) LS_ASSET="emmylua_ls-linux-arm64-glibc.2.17.tar.gz"; CHECK_ASSET="emmylua_check-linux-arm64-glibc.2.17.tar.gz" ;; \
*) echo "unsupported arch for EmmyLua binaries: $ARCH" >&2; exit 1;; \
esac \
&& BASE="https://github.com/EmmyLuaLs/emmylua-analyzer-rust/releases/download/${EMMYLUA_VERSION}" \
&& curl -fsSL "$BASE/$LS_ASSET" | tar xz -C /usr/local/bin \
&& curl -fsSL "$BASE/$CHECK_ASSET" | tar xz -C /usr/local/bin \
&& chmod +x /usr/local/bin/emmylua_ls /usr/local/bin/emmylua_check
LABEL com.github.containers.toolbox="true"