-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
234 lines (170 loc) · 7.2 KB
/
Dockerfile
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
FROM ubuntu:20.04
LABEL maintainer="Gregor von Laszewski <[email protected]>" maintainer="George K. Thiruvathukal <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
#Ultimate text management dockerfile
#OS 20.04
# reasoning: ubuntu is easy and one could convert dockerfile to native. good for testing native installs
#Initial dockerfiel for inspiration:
# * https://github.com/cyberaide/bookmanager/blob/main/docker/20.04/Dockerfile
#Here is why I am excited about your Dockerfile idea. I have a course proposal that is aimed at bringing these tools/techniques to audiences that would otherwise ignore them (read: people who think Word is the best thing since...)
#It's an interdisciplinary course proposal, Introduction to Notetaking Tools and Techniques [really a course about using many tools in the Dockerfile].
#* add topic notetaking at scale, i did this with more then 70 students. word breaks easily. ....
#https://www.overleaf.com/read/xmfxynswngmf
#check out:
# * https://github.com/cloudmesh/cloudmesh-mpi/blob/main/docs/report-group.pdf
#
# * https://laszewski.medium.com/simple-collaboration-tools-for-open-source-teams-aead3a0c46ae
####################################################################################
# SYSTEM TOOLS
#
RUN apt-get update
RUN apt-get install -y \
git \
git-core \
wget \
curl \
rsync
####################################################################################
# INSTALL EMACS
#
RUN apt-get install -y emacs-nox
####################################################################################
# DEVELOPMENT TOOLS
#
RUN apt-get install -y build-essential checkinstall --fix-missing
RUN apt-get install -y \
lsb-core \
dnsutils \
libssl-dev \
libffi-dev \
libreadline-gplv2-dev \
libncursesw5-dev \
libsqlite3-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
zlib1g-dev \
libncurses-dev \
libgdbm-dev \
libz-dev \
tk-dev \
libsqlite3-dev \
liblzma-dev
# libreadline-dev \
# we may not need tk
####################################################################################
## INSTALL SOURCE PYTHON 3.10.1
## PYTHON_VERSION=3.10.1
## RUN wget https://www.python.org/ftp/python/$(PYTHON_VESRION)/Python-$(PYTHON_VERSION).tgz
## RUN tar xvf Python-$(PYTHON_VERSION).tgz
### TODO: cd Python-$(PYTHON_VERSION)
## RUN ./configure --enable-optimizations --prefix=$HOME/python3.10
## RUN make altinstall
## to overwrite existing python
## make install
####################################################################################
# INSTALL APT PYTHON 3.10
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.10
RUN apt install -y python3-pip
####################################################################################
# INSTALL LATEX, BIBTEX, this should aso have biblatex (check needed)
RUN apt-get -y install texlive
RUN ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime \
&& echo "Etc/UTC" > /etc/timezone
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install texlive-latex-extra
RUN apt-get -y install texlive-fonts-recommended texlive-fonts-extra
RUN apt-get -y install texlive-xetex
RUN unset DEBIAN_FRONTEND
####################################################################################
#
# BibTool
RUN apt install -y bibtool
####################################################################################
# INSTALL BIBER
RUN apt-get install -y biber
####################################################################################
# INSTALL GRAPHVIZ
RUN apt-get install -y graphviz
####################################################################################
# INSTALL PANDOC (updated from 2.14.2 to 2.16.2, Jan 2022)
# https://github.com/jgm/pandoc/releases/download/2.16.2/pandoc-2.16.2-1-amd64.deb
ENV PANDOC_VERSION=2.16.2
RUN wget -q https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb
RUN dpkg -i pandoc-${PANDOC_VERSION}-1-amd64.deb
RUN pandoc --version
# INSTALL CROSSREF (updated from version 3.12.0c to v0.3.12.1a, Jan 2022
# https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.12.1a/pandoc-crossref-Linux.tar.xz
ENV CROSSREF_VERSION=v0.3.12.1a
RUN wget https://github.com/lierdakil/pandoc-crossref/releases/download/${CROSSREF_VERSION}/pandoc-crossref-Linux.tar.xz
RUN tar xvf pandoc-crossref-Linux.tar.xz
RUN mv pandoc-crossref /usr/local/bin
#
# INSTALL PANDOC EXTENSIONS
#
RUN pip install pandoc-include
RUN pip install pandoc-xnos
####################################################################################
#
# INSTALL jq and yq query processing
#
RUN apt install -y jq
RUN pip install yq
####################################################################################
# INSTALL GO
#
# RUN apt install -y golang
####################################################################################
# INSTALL HUGO
#I do not like the homebrew install, but it works on 20.04 we need extended version of hugo
#Right, I recommend not using Homebrew on Linux. It tends to have conflicts with many base packages.
#do you have hugo install instructions?
####################################################################################
# INSTALL SPHINX
RUN apt-get install -y python3-sphinx
## RUN pip install -U sphinx
####################################################################################
#
# INSTALL Pygments (newest)
#
RUN pip install pygments
####################################################################################
# INSTALL BOOKMANAGER
# Hey, how come you didn't set up PyPI for Bookmanager yet? Let me know if I can help with that... :-)
# RUN git clone https://github.com/cyberaide/bookmanager.git
# WORKDIR /usr/local/code/bookmanager
# RUN pip install -e .
####################################################################################
# INSTALL PDF and eBook Tools - poppler, Calibre latest
# RUN pip install python-poppler
# RUN wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
####################################################################################
# INSTALL zettelgeist
RUN pip install zettelgeist
# WOULD BE COOL
#maybe we can have a menu as python script
#1 - hugo
#2 - sphinx
#3 - ACM LaTeX
#4 - IEEE LaTeX
#here an example ow to call it:
# ./doc-setup.py --hugo --theme=docsy sitename
# ./doc-setup.py --latex --theme=acm document.tex
# ./doc-setup.py --sphinx sitename
# The way this works we ut this on pypi than internally it set
# up the docker image and calls the appropriate thing, so no one has to remember the docker commands ...
# Install NodeJS and tooling
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt install -y nodejs \
&& npm install -g [email protected] [email protected] [email protected] [email protected] @babel/cli @babel/core
RUN wget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.5.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /usr/local/code
RUN git clone https://github.com/gohugoio/hugo.git
WORKDIR /usr/local/code/hugo
RUN go install --tags extended
ENV PATH="/root/go/bin:${PATH}"
WORKDIR /root