forked from MidnightCommander/mc-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
82 lines (72 loc) · 1.76 KB
/
Dockerfile
File metadata and controls
82 lines (72 loc) · 1.76 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Start with the base Alpine Linux image
FROM alpine:latest
# Set the maintainer label
LABEL maintainer "Your Name <your_email@example.com>"
# Set environment variable for non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive
# Install required dependencies
RUN apk add --no-cache \
glib \
libintl \
libssh2 \
ncurses-libs \
autoconf \
automake \
e2fsprogs-dev \
gettext-dev \
git \
glib-dev \
libtool \
pcre-dev \
gcc \
make \
&& apk add --update alpine-sdk
# Set terminal environment variable
ENV TERM xterm
# Add group and user for Midnight Commander
RUN addgroup -g 1001 -S mc \
&& adduser -u 1001 -SHG mc mc \
&& mkdir -p /home/mc/.mc
# Set the Midnight Commander version
ENV MC_VERSION 4.8.21
# Run necessary build steps and compile Midnight Commander
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
aspell-dev \
libssh2-dev \
ncurses-dev \
&& git clone --depth 1 --branch "$MC_VERSION" https://github.com/MidnightCommander/mc.git /usr/src/mc \
&& ( \
cd /usr/src/mc \
&& ./autogen.sh \
&& ./configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--enable-background \
--enable-charset \
--enable-largefile \
--enable-vfs-sftp \
--with-internal-edit \
--with-mmap \
--with-screen=ncurses \
--with-subshell \
--without-gpm-mouse \
--without-included-gettext \
--without-x \
--enable-aspell \
&& make \
&& make install \
) \
&& curl -sSL "https://raw.githubusercontent.com/nkulikov/mc-solarized-skin/master/solarized.ini" > /home/mc/.mc/solarized.ini \
&& rm -rf /usr/src/mc \
&& apk del .build-deps \
&& chown -R mc:mc /home/mc
# Set environment variables
ENV HOME=/home/mc
ENV MC_SKIN=${HOME}/.mc/solarized.ini
# Set the working directory
WORKDIR ${HOME}
# Set the entry point to run Midnight Commander
ENTRYPOINT [ "mc" ]