This repository was archived by the owner on May 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
157 lines (145 loc) · 4.61 KB
/
Copy pathDockerfile
File metadata and controls
157 lines (145 loc) · 4.61 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
###########################################################################
# lilypond-base: minimal image for running lilypond and its scripts
###########################################################################
FROM ubuntu:23.04 as lilypond-base
## The fonts-texgyre package (the preferred default fonts) is not
## strictly required, since LilyPond can fall back on other fonts, but
## it is convenient to include in the base image so that it is
## consistently available in derived images.
##
## TODO: Don't install adduser? or remove it when we're finished with it?
##
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
adduser \
fonts-texgyre \
ghostscript \
guile-2.2 \
libpangoft2-1.0-0 \
python-is-python3 \
python3 \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Add a non-root user who can run sudo without a password.
RUN useradd -m -s /bin/bash user \
&& adduser user sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& sudo -u user touch ~user/.sudo_as_admin_successful
USER user
COPY --chown=user:user ./install/base_bashrc_addendum /home/user/base_bashrc_addendum
RUN cat ~/base_bashrc_addendum >> ~/.bashrc && rm ~/base_bashrc_addendum \
&& mkdir ~/lilypond-build
###########################################################################
# lilypond: for running LilyPond
###########################################################################
FROM lilypond-base as lilypond
# Include LilyPond in the PATH. We don't do this in the base image
# because we don't want the development workflow to come to depend on
# it accidentally.
RUN echo 'PATH="$HOME/lilypond-build/out/bin:$PATH"' >> ~/.profile
## LilyPond itself requires nothing more, but you may wish to install
## extra packages that your personal workflow requires. Adding them
## here will add them to the lilypond image without adding them to the
## lilypond-dev image. Example:
# USER root
# RUN apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
# make \
# && rm -rf /var/lib/apt/lists/*
# USER user
###########################################################################
# lilypond-dev: for LilyPond development
###########################################################################
FROM lilypond-base as lilypond-dev
## YUCK: Testing, e.g. make test-baseline, uses git.
##
## Packages that are for debugging and profiling rather than building
## and testing:
##
## * gdb
## * less
## * moreutils (ts, errno, etc.)
## * strace
##
USER root
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
autoconf \
autotools-dev \
bison \
dblatex \
debhelper \
extractpdfmark \
flex \
fontforge \
fonts-dejavu \
fonts-linuxlibertine \
fonts-noto-cjk \
fonts-urw-base35 \
g++ \
gcc \
gdb \
gettext \
git \
groff \
guile-2.2-dev \
help2man \
imagemagick \
less \
libfl-dev \
libfontconfig1-dev \
libfreetype6-dev \
libgmp3-dev \
libgs-dev \
libltdl-dev \
libpango1.0-dev \
lmodern \
m4 \
make \
mftrace \
moreutils \
netpbm \
pkg-config \
quilt \
rsync \
strace \
texi2html \
texinfo \
texlive-fonts-recommended \
texlive-font-utils \
texlive-lang-cyrillic \
texlive-metapost \
texlive-plain-generic \
texlive-xetex \
tidy \
ttf-bitstream-vera \
zip \
&& rm -rf /var/lib/apt/lists/*
# Perl modules for makelsr
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
cpanminus \
libanyevent-forkmanager-perl \
libdbd-mysql-perl \
libfile-which-perl \
libipc-run3-perl \
pandoc \
&& cpanm module MySQL::Dump::Parser::XS \
&& DEBIAN_FRONTEND=noninteractive apt-get remove -y cpanminus \
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Support sharing the build directory with Samba. If you don't need
# this, you can reduce the image size slightly by commenting it out.
# You'll also need to modify docker-compose.yaml so that it does not
# try to start smbd.
USER root
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
samba \
&& rm -rf /var/lib/apt/lists/* \
&& echo "[lilypond-build]" >> /etc/samba/smb.conf \
&& echo " path = /home/user/lilypond-build" >> /etc/samba/smb.conf \
&& echo " read only = yes" >> /etc/samba/smb.conf \
&& echo " guest ok = yes" >> /etc/samba/smb.conf \
&& echo " force user = user" >> /etc/samba/smb.conf
USER user