init
This commit is contained in:
76
Dockerfile
Normal file
76
Dockerfile
Normal file
@@ -0,0 +1,76 @@
|
||||
FROM ubuntu:24.04 AS updated
|
||||
|
||||
RUN apt update
|
||||
|
||||
|
||||
FROM updated AS locales
|
||||
|
||||
RUN apt install -y locales
|
||||
RUN locale-gen en_US.UTF-8
|
||||
RUN update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
||||
|
||||
|
||||
FROM locales AS dependencies
|
||||
|
||||
RUN apt install -y \
|
||||
build-essential \
|
||||
chrpath \
|
||||
cpio \
|
||||
curl \
|
||||
debianutils \
|
||||
diffstat \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
iputils-ping \
|
||||
libacl1 \
|
||||
liblz4-tool \
|
||||
python3 \
|
||||
python3-git \
|
||||
python3-jinja2 \
|
||||
python3-pexpect \
|
||||
python3-pip \
|
||||
python3-subunit \
|
||||
socat \
|
||||
sudo \
|
||||
texinfo \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
zsh \
|
||||
zstd
|
||||
|
||||
FROM dependencies AS userspace
|
||||
|
||||
RUN userdel -r ubuntu
|
||||
RUN useradd -m -u 1000 yocto
|
||||
RUN usermod -aG sudo yocto
|
||||
RUN echo "yocto:yocto" | chpasswd
|
||||
RUN chsh -s $(which zsh) yocto
|
||||
|
||||
USER yocto
|
||||
|
||||
FROM userspace AS ohmyzsh
|
||||
|
||||
ENV ZSH_CUSTOM=/home/yocto/.oh-my-zsh/custom
|
||||
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
|
||||
RUN git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
|
||||
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
|
||||
|
||||
ADD zsh/.zshrc /home/yocto/
|
||||
ADD zsh/.p10k.zsh /home/yocto/
|
||||
|
||||
USER root
|
||||
RUN chown -R yocto:yocto /home/yocto
|
||||
USER yocto
|
||||
|
||||
ENV TERM=xterm-256color
|
||||
|
||||
|
||||
FROM ohmyzsh
|
||||
|
||||
WORKDIR /home/yocto/ws
|
||||
ENTRYPOINT ["zsh"]
|
||||
Reference in New Issue
Block a user