diff --git a/Dockerfile b/Dockerfile index e906b40..c120670 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,46 +1,59 @@ -ARG SWIFT_VERSION="swift:latest" -ARG SWIFT_BACKTRACE="enable=no" - -FROM docker.io/${SWIFT_VERSION} AS build +###################################################### +# BUILD IMAGE +###################################################### +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 \ + && apt-get -q 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 +# Build and install starship, bob, and neovim. +RUN rustup default stable \ + && cargo install starship --locked \ + && 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_VERSION} +###################################################### +# RUN IMAGE +###################################################### +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 \ + && apt-get -q install -y \ + curl \ + direnv \ + eza \ + fzf \ + ripgrep \ + zsh \ && 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 +# Remove the ubuntu user, if it exists, so we can create the "swift" user. +RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu || true -RUN cat >> /root/.bashrc <