Files
swift-dev-container/Dockerfile
Michael Housh 3b2fd14acf
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
feat: Updates readme, removes some unneeded packages from container build
2025-11-12 13:51:10 -05:00

42 lines
1.0 KiB
Docker

FROM docker.io/swift:latest AS build
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get install -y \
cmake \
rustup \
&& rm -rf /var/lib/apt/lists/*
RUN rustup default stable && \
cargo install --git https://github.com/MordechaiHadad/bob.git && \
/root/.cargo/bin/bob install nightly && \
/root/.cargo/bin/bob use nightly
FROM docker.io/swift:latest
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get install -y \
cmake \
curl \
git \
tree-sitter-cli \
wget \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /root/.cargo/bin/bob /root/bin/bob
COPY --from=build /root/.local/share/bob /root/.local/share/bob
RUN cat >> /root/.bashrc <<EOF
PATH="/root/bin:/root/.local/share/bob/nvim-bin:$PATH"
alias n='nvim'
EOF
WORKDIR /root/dev
VOLUME /root/dev
CMD [ "/bin/bash", "-c", "/root/.local/share/bob/nvim-bin/nvim" ]