SolidOak
SolidOak copied to clipboard
DockerContainer for Arch Linux users
Hi all
I tried to build a DockerContainer but I have a strange error message:
error: could not find native static library `nvim`, perhaps an -L flag is missing?
error: Could not compile `neovim-rs`.
Can I build it with the stable toolchain?
Regards
Dockerfile:
FROM scorpil/rust:stable
RUN apt update && \
apt upgrade -qy && \
apt install -qy hicolor-icon-theme gnome-icon-theme-extras git \
libgtk-3-dev libglib2.0-dev libcairo2-dev libvte-2.90-dev \ &&
apt install -qy \
libtool autoconf automake cmake libncurses5-dev g++ pkg-config unzip \
&& \
rm -rf /var/lib/apt/lists/*
RUN cd /rust && git clone https://github.com/oakes/SolidOak.git && \
cd SolidOak && rm -rf .git && \
RUST_BACKTRACE=1 cargo build --release
# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
mkdir -p /home/user/.local/share/ && \
mkdir -p /home/user/.config/gtk-3.0 && \
echo -e "[Settings]\ngtk-recent-files-max-age=0\ngtk-recent-files-limit=0" > /home/user/.config/gtk-3.0/settings.ini && \
echo gtk-recent-files-max-age=0 >> /home/user/.gtkrc-2.0 && \
echo "user:x:${uid}:${gid}:Developer,,,:/home/user:/bin/bash" >> /etc/passwd && \
echo "user:x:${uid}:" >> /etc/group && \
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
chmod 0440 /etc/sudoers.d/user && \
chown ${uid}:${gid} -R /home/user && chmod 755 -R /home/user
USER user
ENV HOME /home/user
CMD cd /rust/SolidOak && cargo run --release || echo 'try "xhost + localhost" if it does not start'
# Build like this:
# docker build --no-cache -t dns2utf8/solidoak .
# Start like this:
# docker run -ti --rm --net=host -e DISPLAY=$DISPLAY --volume="/tmp/.X11-unix/:/tmp/.X11-unix/:rw" --volume="$HOME/.Xauthority:/home/user/.Xauthority:rw" --volume="$(pwd):/home/user/$(basename $(pwd)):rw" dns2utf8/solidoak
@dns2utf8 I ran into the same problem.
The following workaround works for me:
change line 17-19 in Cargo.toml to
toml [dependencies.neovim-rs] #git = "https://github.com/oakes/neovim-rs" path = "../neovim-rs"
Then from this directory run git clone https://github.com/oakes/neovim-rs ../neovim-rs
I don't quite get it, but this way everything compiles. :-) Possibly a Cargo bug, but I am not sure.
@oakes: Do you have any idea what's going wrong here?
PS: I am using rustup + rust nightly (cae6ab1c4 2016-11-05).