101 lines
3.8 KiB
Docker
101 lines
3.8 KiB
Docker
FROM ubuntu:latest
|
|
|
|
ARG APT_MIRROR=re
|
|
# Set the APT mirror to use for downloading packages
|
|
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1$APT_MIRROR.\2/" /etc/apt/sources.list
|
|
|
|
# Update package definitions & install basic packages
|
|
RUN apt-get update && apt-get install -y wget git curl software-properties-common
|
|
|
|
# Install zsh
|
|
RUN apt-get install -y zsh
|
|
|
|
# Add user
|
|
WORKDIR /root
|
|
|
|
# Install starship
|
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes
|
|
|
|
# Install eza
|
|
RUN apt-get install -y gpg && \
|
|
mkdir -p /etc/apt/keyrings && \
|
|
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor -o /etc/apt/keyrings/gierens.gpg && \
|
|
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | tee /etc/apt/sources.list.d/gierens.list && \
|
|
chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list && \
|
|
apt update && \
|
|
apt install -y eza
|
|
|
|
# Install fzf
|
|
RUN git clone --depth 1 https://github.com/junegunn/fzf.git /root/.fzf && \
|
|
/root/.fzf/install
|
|
|
|
# Install zoxide
|
|
RUN curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
|
|
|
# Install zsh-autosuggestions plugin
|
|
RUN mkdir -p /root/.zsh && \
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions /root/.zsh/zsh-autosuggestions
|
|
|
|
# Install neovim binaries
|
|
RUN apt-get install -y build-essential unzip ripgrep && \
|
|
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz && \
|
|
rm -rf /opt/nvim && \
|
|
tar -C /opt -xzf nvim-linux64.tar.gz && \
|
|
rm nvim-linux64.tar.gz
|
|
|
|
# Golang
|
|
RUN add-apt-repository ppa:longsleep/golang-backports && \
|
|
apt update && \
|
|
apt install -y golang-go
|
|
|
|
# Go tools
|
|
RUN go install github.com/pressly/goose/v3/cmd/goose@latest
|
|
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
|
|
|
|
# Nodejs
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
|
|
apt-get install -y nodejs
|
|
|
|
RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') && \
|
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" && \
|
|
tar xf lazygit.tar.gz lazygit && \
|
|
install lazygit /usr/local/bin && \
|
|
rm lazygit.tar.gz
|
|
|
|
RUN apt-get install -y postgresql-client
|
|
|
|
RUN apt-get install -y tmux xclip
|
|
RUN git clone https://github.com/tmux-plugins/tpm /root/.tmux/plugins/tpm
|
|
|
|
RUN apt-get install -y python3 python3-pip
|
|
|
|
RUN curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
|
|
gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg && \
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$(dpkg --print-architecture) stable main" | \
|
|
tee /etc/apt/sources.list.d/1password.list && \
|
|
mkdir -p /etc/debsig/policies/AC2D62742012EA22/ && \
|
|
curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | \
|
|
tee /etc/debsig/policies/AC2D62742012EA22/1password.pol && \
|
|
mkdir -p /usr/share/debsig/keyrings/AC2D62742012EA22 && \
|
|
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
|
|
gpg --dearmor --output /usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg && \
|
|
apt update && apt install 1password-cli
|
|
|
|
RUN apt-get install -y locales && \
|
|
sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \
|
|
locale-gen
|
|
ENV LANG fr_FR.UTF-8
|
|
ENV LANGUAGE fr_FR:fr
|
|
ENV LC_ALL fr_FR.UTF-8
|
|
|
|
ENV TERM=xterm-256color
|
|
|
|
ENV CACHEBUST=7
|
|
# Copy config files
|
|
RUN echo ${CACHEBUST} && curl -Lks https://git.lehouerou.net/laurent/dotfiles/raw/branch/master/install.sh | /bin/bash
|
|
|
|
VOLUME ["/root/.local/share/nvim", "/root/.cache/nvim", "/root/.local/state/nvim"]
|
|
|
|
|
|
ENTRYPOINT [ "/bin/zsh", "-c", "cd ./dev && exec /bin/zsh -l" ]
|