forked from skwp/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (50 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
59 lines (50 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:22.04
LABEL maintainer="Luiz Filho <lfilho@gmail.com>"
ENV TERM=xterm-256color
# Bootstrapping packages needed for installation
RUN \
apt-get update && \
apt-get install -yqq \
locales \
lsb-release \
software-properties-common && \
apt-get clean
# Set locale to UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN localedef -i en_US -f UTF-8 en_US.UTF-8 && \
/usr/sbin/update-locale LANG=$LANG
# Install dependencies
# Universe repository is enabled by default in Ubuntu 22.04
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get -yqq install \
autoconf \
build-essential \
curl \
fontconfig \
git \
neovim \
python3 \
python3-pip \
python3-dev \
sudo \
tmux \
unzip \
vim \
wget \
zsh && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create non-root user for Homebrew installation
RUN useradd -m -s /bin/bash yadr && \
echo "yadr ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Install dotfiles as non-root user
USER yadr
WORKDIR /home/yadr
COPY --chown=yadr:yadr . /home/yadr/.yadr
# Accept CI build argument and set as environment variable
ARG CI=false
ENV CI=${CI}
RUN cd /home/yadr/.yadr && ./install.sh
# Run a zsh session
CMD [ "/bin/zsh" ]