Sign inSign up

tanguyperennou/interactive-shells

By tanguyperennou

•Updated over 3 years ago

Interactive bash or zsh shell with starship, neovim, fd, etc.

Image
0

159

tanguyperennou/interactive-shells repository overview

⁠The interactive-shells Docker image

⁠What is this image?

This image is meant to be used as a bash shell where the user can spend some time calling numerous commands. It is an alpine or ubuntu image augmented with:

  • bash and zsh
  • starship prompt, displaying container ID, local IP, current shell and current working dir
  • exa (aliased as ls, l, ll, la, lt)
  • other useful tools:
    • nvim
    • fd, rg
    • htop
    • nc

⁠Supported tags

  • alpine-3.17, alpine
  • ubuntu-22.04, ubuntu

⁠How to use it?

⁠Test simple Rust programs

It can be used to run Rust crates. For instance, if you put a Dockerfile at the root of a very simple Cargo project named hello:

FROM rust:1.67.1-alpine3.17 AS builder
COPY . .
RUN cargo install --path .

FROM tanguyperennou/interactive-shells:alpine-3.17
COPY --from=builder /usr/local/cargo/bin/hello /usr/local/bin/hello

However, if you want to run an IPLD- or libp2p-based crate, you have to include Protobuf packages at build and/or run stages. For an Alpine interactive shell:

FROM rust:1.67.1-alpine3.17 AS builder
RUN apk add --no-cache protobuf musl-dev
COPY . .
RUN cargo install --path .

FROM tanguyperennou/interactive-shells:alpine-3.17
RUN apk add --no-cache protobuf
COPY --from=builder /usr/local/cargo/bin/ping-test /usr/local/bin/ping-test

And for a Ubuntu interactive shell:

FROM rust:1.67 AS builder
RUN apt update -y \
 && apt install -y protobuf-compiler \
 && rm -rf /var/lib/apt/lists/* 
COPY . .
RUN cargo install --path .

FROM tanguyperennou/interactive-shells:ubuntu-22.04
COPY --from=builder /root/.cargo/bin/ping-test /usr/local/bin/ping-test

Tag summary

Content type

Image

Digest

sha256:30952332c…

Size

53.5 MB

Last updated

over 3 years ago

docker pull tanguyperennou/interactive-shells:ubuntu-22.04