Shell and dotfiles
Build your dotfiles into the image, so containers have your shell, its configuration and your command-line tools. This guide uses the author’s dotfiles, dotfishy, which set up Fish and tools such as fzf and bat with mise.
Set up
Use the files in examples/guides/dotfiles:
# yaml-language-server: $schema=https://isodev.dyszkiewicz.me/config.schema.json
# Your dotfiles, built into the image.
image: isodev-dotfiles:latest
build:
context: imageFROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
ENV PATH=/root/.local/share/mise/shims:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl git jq \
&& rm -rf /var/lib/apt/lists/*
# Dotfiles, here https://github.com/jakubdyszkiewicz/dotfishy: replace the URL
# and branch with yours. Docker checks the branch on every build and rebuilds
# from here when it has new commits.
ADD https://github.com/jakubdyszkiewicz/dotfishy.git#master /root/.dotfishy
# An empty profile selects dotfishy's server role: Fish and other apt packages,
# the dotfile links and the CLI tools, without development toolchains.
RUN : > /root/.dotfishy/profile \
&& /root/.dotfishy/install.shTo use your own dotfiles, replace the repository URL and branch in the ADD step, and the RUN step with however your dotfiles are installed. A public repository works as it is. For a private one, build the image with access to it, or copy the dotfiles into the build context instead.
isodev enter starts Fish when the image has it, otherwise Bash or sh.
Use it
isodev up --recreate
isodev enterWhen you push to your dotfiles repository, the next build of the image picks up the change; existing containers keep the old image until you run isodev up --recreate.