diff --git a/Dockerfile b/Dockerfile index c4883cd..b69afee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,12 @@ +FROM ubuntu:22.04 as jetporch-builder +ENV PATH /root/.cargo/bin:${PATH} +RUN apt-get update \ + && apt-get install -y build-essential curl git libssl-dev pkg-config \ + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ + && git clone https://git.sr.ht/~mpdehaan/jetporch /tmp/jetporch \ + && cd /tmp/jetporch \ + && make + FROM ubuntu:22.04 # system deps @@ -143,12 +152,10 @@ RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elix # command line utilities RUN curl https://mise.jdx.dev/install.sh | sh \ && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \ - && git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ - && git clone https://git.sr.ht/~mpdehaan/jetporch ${LOCAL_SRC_HOME}/jetporch \ - && cd ${LOCAL_SRC_HOME}/jetporch \ - && make \ - && ln -s ${LOCAL_SRC_HOME}/jetporch/target/release/jetp ${LOCAL_BIN_HOME}/ + && git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm + +# fetch jetporch from builder step +COPY --from=jetporch-builder --chown=coder:coder /tmp/jetporch/target/release/jetp ${LOCAL_BIN_HOME} # configure fish and bash RUN fish -c true \