forked from samoshkin/tmux-config
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile-v3.5
96 lines (79 loc) · 2.73 KB
/
Dockerfile-v3.5
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Set the base image to Debian 12 slim
FROM debian:stable-slim
# Maintainer
LABEL maintainer="slange-dev" \
org.opencontainers.image.authors="slange-dev" \
org.opencontainers.image.title="tmux-config-test-v3.5" \
org.opencontainers.image.description="Tmux config test v3.5" \
org.opencontainers.image.source="https://github.com/slange-dev/tmux-config-test"
# Version
LABEL version="3.5"
# Set workdir
WORKDIR /root
# Set shell to bash with -c
SHELL ["/bin/bash", "-c"]
# Set timezone
ENV TZ="Europe/Berlin"
# Prevent package installation prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies and build tmux
RUN apt-get update && apt-get install -y --no-install-recommends \
bc=1.07.1-3+b1 \
build-essential=12.9 \
bison=2:3.8.2+dfsg-1+b1 \
byacc=1:2.0.20221106-1 \
ca-certificates=20230311 \
fontconfig=2.14.1-4 \
git=1:2.39.5-0+deb12u1 \
gcc=4:12.2.0-3 \
iputils-ping=3:20221126-1+deb12u1 \
libevent-dev=2.1.12-stable-8 \
libncurses-dev=6.4-4 \
locales=2.36-9+deb12u9 \
make=4.3-4.1 \
netcat-traditional=1.10-47 \
pkg-config=1.8.1-1 \
procps=2:4.0.2-3 \
wget=1.21.3-1+b2 \
vlock=2.2.2-11+b1 \
xclip=0.13-2 \
xsel=1.2.0+git9bfc13d.20180109-4
# Install tmux
RUN wget -O - https://github.com/tmux/tmux/releases/download/3.5/tmux-3.5.tar.gz | tar xzf - \
&& cd tmux-3.5 \
&& LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local \
&& make \
&& make install \
&& cd .. \
&& rm -rf tmux-3.5 \
&& apt-get purge -y gcc make \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/*
# Set language
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
# Set language env
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
# Install Powerline symbols and fonts
RUN wget -P /usr/local/share/fonts/powerline https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf \
&& wget -P /usr/share/fontconfig/conf.avail https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf \
&& ln -s /usr/share/fontconfig/conf.avail/10-powerline-symbols.conf /etc/fonts/conf.d/10-powerline-symbols.conf \
&& fc-cache -vf /usr/local/share/fonts/powerline
# Install tmux config files from tmux testing repository
RUN mkdir -p tmux-config-test \
&& git clone https://github.com/slange-dev/tmux-config-test tmux-config-test \
&& chmod +x tmux-config-test/install.sh \
&& source tmux-config-test/install.sh
# Copy tmux start script
COPY run_tmux.sh run_tmux.sh
# Set term env to xterm-256 colors
ENV TERM=xterm-256color
# Set shell env to bash
ENV SHELL=/bin/bash
# Set user env to root
ENV USER=root
# Run tmux start script
ENTRYPOINT ["/bin/bash", "run_tmux.sh"]