-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
1432 lines (1158 loc) · 42.8 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Read Our Docs - Environment base
#
# -- derived from official Ubuntu Docker image
# -- see: https://hub.docker.com/_/ubuntu/tags
# -- see: https://github.com/docker-library/official-images
#
# -- support Docker multi-platform image build
# -- see: https://docs.docker.com/build/building/multi-platform
# -- see: https://docs.docker.com/build/building/variables/#multi-platform-build-arguments
#
# -- TARGETPLATFORM=linux/amd64: TARGETOS=linux, TARGETARCH=amd64, TARGETVARIANT=
# -- TARGETPLATFORM=linux/arm/v7: TARGETOS=linux, TARGETARCH=arm, TARGETVARIANT=v7
# -- TARGETPLATFORM=linux/arm64: TARGETOS=linux, TARGETARCH=arm64, TARGETVARIANT=
# -- TARGETPLATFORM=linux/riscv64: TARGETOS=linux, TARGETARCH=riscv64, TARGETVARIANT=
# -- TARGETPLATFORM=linux/ppc64le: TARGETOS=linux, TARGETARCH=ppc64le, TARGETVARIANT=
#
# ############################################################################
#
# Base system maintenance with official Ubuntu Docker image
#
# ############################################################################
FROM ubuntu:noble-20240904.1 AS base
LABEL mantainer="Stephan Linz <stephan.linz@tiac-systems.de>"
LABEL version="2024.10.1"
LABEL org.opencontainers.image.vendor="TiaC Systems Network"
LABEL org.opencontainers.image.authors="Stephan Linz <stephan.linz@tiac-systems.de>"
LABEL org.opencontainers.image.documentation="https://github.com/tiacsys/readourdocs-docker-images/blob/main/README.md"
# ############################################################################
#
# asdf-vm runtime version
# https://asdf-vm.com/
# https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md
#
# Define asdf-vm branch to be installed via git-clone
ENV ROD_ASDF_BRANCH=v0.14.1
#
# Rust runtime versions
# https://releases.rs/
#
# Define Rust versions to be installed via asdf
ENV ROD_RUST_VERSION_2024=1.81.0
ENV ROD_RUST_VERSION_2023=1.76.0
ENV ROD_RUST_VERSION_2022=1.67.1
#
# Golang runtime versions
# https://go.dev/doc/devel/release
#
# Define Golang versions to be installed via asdf
ENV ROD_GOLANG_VERSION_2024=1.23.1
ENV ROD_GOLANG_VERSION_2023=1.21.13
ENV ROD_GOLANG_VERSION_2022=1.19.13
#
# Node.js runtime versions
# https://nodejs.org/en/about/previous-releases
#
# Define Node.js versions to be installed via asdf
ENV ROD_NODEJS_VERSION_22=22.9.0
ENV ROD_NODEJS_VERSION_20=20.17.0
ENV ROD_NODEJS_VERSION_18=18.20.4
#
# Ruby runtime versions
# https://www.ruby-lang.org/en/downloads/branches
# https://www.ruby-lang.org/en/downloads/releases
#
# Define Ruby versions to be installed via asdf
ENV ROD_RUBY_VERSION_33=3.3.5
ENV ROD_RUBY_VERSION_32=3.2.5
ENV ROD_RUBY_VERSION_31=3.1.6
#
# Python runtime versions
# https://www.python.org/downloads
# https://devguide.python.org/versions
#
# PyPy runtime versions
# https://downloads.python.org/pypy
# https://pypy.org/download_advanced.html
# https://pypy.org/categories/release.html
# https://doc.pypy.org/en/latest/index-of-release-notes.html
#
# Define Python versions to be installed via asdf
ENV ROD_PYTHON_VERSION_312=3.12.7
ENV ROD_PYTHON_VERSION_310=3.10.15
ENV ROD_PYTHON_VERSION_27=2.7.18
ENV ROD_PYPY_VERSION_3=pypy3.10-7.3.17
ENV ROD_PYPY_VERSION_2=pypy2.7-7.3.17
# Define CPython default behaviour for compilations (shared libraries)
ENV PYTHON_CONFIGURE_OPTS=--enable-shared
# Define Python package versions to be installed via pip
ENV ROD_PIP_VERSION=24.2
ENV ROD_SETUPTOOLS_VERSION=75.1.0
ENV ROD_VIRTUALENV_VERSION=20.26.6
ENV ROD_WHEEL_VERSION=0.44.0
ENV ROD_POETRY_VERSION=1.8.3
ENV ROD_WEST_VERSION=1.2.0
#
# PyPA pipx for Python runtime version
# https://repology.org/project/pipx/versions
# https://pipx.pypa.io/stable/installation
# https://github.com/pypa/pipx
#
# Define pipx version to be installed via asdf
ENV ROD_PIPX_VERSION=1.7.1
ENV ROD_PIPX_ARGCOMPLETE_VERSION=3.5.0
# Define Python package versions to be installed via pipx
ENV ROD_POETRY_VERSION_18=1.8.3
ENV ROD_POETRY_VERSION_17=1.7.1
ENV ROD_POETRY_VERSION_16=1.6.1
ENV ROD_POETRY_VERSION_15=1.5.1
ENV ROD_POETRY_VERSION_14=1.4.2
ENV ROD_POETRY_VERSION_13=1.3.2
ENV ROD_POETRY_VERSION_12=1.2.2
ENV ROD_POETRY_VERSION_11=1.1.15
# ############################################################################
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
USER root
WORKDIR /
# ############################################################################
# System dependencies
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
software-properties-common \
vim
RUN apt-get -y autoremove --purge
RUN apt-get clean
# Install requirements
RUN apt-get -y install \
build-essential \
bzr \
curl \
doxygen \
g++ \
git-core \
graphviz-dev \
libbz2-dev \
libcairo2-dev \
libenchant-2-2 \
libevent-dev \
libffi-dev \
libfreetype6 \
libfreetype6-dev \
libgraphviz-dev \
libjpeg8-dev \
libjpeg-dev \
liblcms2-dev \
libmysqlclient-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libtiff5-dev \
libwebp-dev \
libxml2-dev \
libxslt1-dev \
libxslt-dev \
mercurial \
pandoc \
pkg-config \
postgresql-client \
subversion \
zlib1g-dev
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ############################################################################
# Localization dependencies
RUN apt-get -y install \
locales
# Setup locales for German
RUN locale-gen de_DE.UTF-8
RUN update-locale LANG=de_DE.UTF-8
ENV LANG=de_DE.UTF-8
RUN locale -a
# Setup locales for English
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN locale -a
# ############################################################################
# Tools for international spelling check
RUN apt-get -y install \
aspell \
enchant-2 \
hunspell
RUN apt-get -y autoremove --purge
RUN apt-get clean
# Dictionaries for spelling check -- split to reduce image layer size
RUN apt-get -y install \
aspell-en \
hunspell-en-us \
hunspell-en-med
RUN apt-get -y autoremove --purge
RUN apt-get clean
# Dictionaries for spelling check -- split to reduce image layer size
RUN apt-get -y install \
aspell-de \
hunspell-de-de \
hunspell-de-med \
myspell-de-de-1901
RUN apt-get -y autoremove --purge
RUN apt-get clean
# Dictionaries for spelling check -- split to reduce image layer size
RUN apt-get -y install \
wamerican-huge \
wgerman-medical \
wngerman
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ############################################################################
# graphviz: is to support sphinx.ext.graphviz
# https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html
#
# imagemagick: is to support sphinx.ext.imgconverter
# http://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html
#
# rsvg-convert: is for SVG -> PDF conversion
# using Sphinx extension sphinxcontrib.rsvgconverter, see
# https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
#
# plantuml: is to support sphinxcontrib-plantuml
# https://pypi.org/project/sphinxcontrib-plantuml
#
# pdf2svg (poppler-utils): is required for different workflows,
# needed to convert PDF -> SVG conversion, alternative to pdftocairo, see
# http://cityinthesky.co.uk/opensource/pdf2svg
# https://poppler.freedesktop.org/
#
# swig: is required for different purposes
# https://github.com/readthedocs/readthedocs-docker-images/issues/15
RUN apt-get -y install \
graphviz \
imagemagick \
librsvg2-bin \
pdf2svg \
plantuml \
poppler-utils \
swig
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ############################################################################
# LaTeX -- split to reduce image layer size
RUN apt-get -y install \
texlive-fonts-extra
RUN apt-get -y install \
texlive-fonts-recommended
RUN apt-get -y install \
texlive-lang-english
RUN apt-get -y install \
texlive-lang-european
RUN apt-get -y install \
texlive-lang-japanese
RUN apt-get -y install \
texlive-pictures
RUN apt-get -y install \
texlive-science
RUN apt-get -y install \
texlive-xetex
RUN apt-get -y install \
texlive-full
RUN apt-get -y autoremove --purge
RUN apt-get clean
# lmodern: extra fonts
# https://github.com/rtfd/readthedocs.org/issues/5494
#
# xindy: is useful to generate non-ascii indexes
# https://github.com/rtfd/readthedocs.org/issues/4454
#
# fonts-noto-cjk-extra
# fonts-hanazono: chinese fonts
# https://github.com/readthedocs/readthedocs.org/issues/6319
RUN apt-get -y install \
fonts-symbola \
lmodern \
latex-cjk-chinese-arphic-bkai00mp \
latex-cjk-chinese-arphic-gbsn00lp \
latex-cjk-chinese-arphic-gkai00mp \
fonts-noto-cjk-extra \
fonts-hanazono \
xindy
# latexmk: is needed to generate LaTeX documents
# https://github.com/readthedocs/readthedocs.org/issues/4454
RUN apt-get -y install \
latexmk
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ############################################################################
# asdf Python extra requirements
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
# https://github.com/pyenv/pyenv/issues/1889#issuecomment-833587851
RUN apt-get install -y \
clang \
liblzma-dev \
libncursesw5-dev \
libssl-dev \
libxmlsec1-dev \
llvm \
make \
tk-dev \
wget \
xz-utils
RUN apt-get -y autoremove --purge
RUN apt-get clean
# asdf nodejs extra requirements
# https://github.com/asdf-vm/asdf-nodejs#linux-debian
RUN apt-get install -y \
dirmngr \
gpg
RUN apt-get -y autoremove --purge
RUN apt-get clean
# asdf Golang extra requirements
# https://github.com/asdf-community/asdf-golang#linux-debian
RUN apt-get install -y \
coreutils
RUN apt-get -y autoremove --purge
RUN apt-get clean
# asdf Ruby extra requirements
# https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
RUN apt-get install -y \
autoconf \
patch \
rustc \
libssl-dev \
libyaml-dev \
libreadline6-dev \
libgmp-dev \
libncurses5-dev \
libgdbm6t64 \
libgdbm-dev \
libdb-dev \
uuid-dev
RUN apt-get -y autoremove --purge
RUN apt-get clean
# building Python scipy extra requirements
# https://docs.scipy.org/doc/scipy/dev/contributor/building.html
RUN apt-get install -y \
gfortran \
liblapack-dev \
libopenblas-dev
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ensure Python3 from the system installed
RUN apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-venv
RUN apt-get -y autoremove --purge
RUN apt-get clean
# running Chromium within DeckTape extra requirements
RUN apt-get install -y \
libasound2t64 \
libgbm1
RUN apt-get -y autoremove --purge
RUN apt-get clean
# asdf OpenJDK 21 extra requirements
RUN apt-get install -y \
openjdk-21-jdk
RUN apt-get -y autoremove --purge
RUN apt-get clean
# ############################################################################
#
# Manage multiple runtime versions with the
# asdf version manager in docs user space.
#
# UID and GID from readthedocs/user
RUN groupadd --gid 205 docs
RUN useradd -m --uid 1005 --gid 205 docs
USER docs
WORKDIR /home/docs
# Install asdf
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --branch $ROD_ASDF_BRANCH
RUN echo ". /home/docs/.asdf/asdf.sh" >> /home/docs/.bashrc
RUN echo ". /home/docs/.asdf/completions/asdf.bash" >> /home/docs/.bashrc
# Activate asdf in current session
ENV PATH=/home/docs/.asdf/shims:/home/docs/.asdf/bin:$PATH
# Install asdf plugins
RUN asdf plugin add pipx https://github.com/yozachar/asdf-pipx.git
RUN asdf plugin add python https://github.com/asdf-community/asdf-python.git
RUN asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
RUN asdf plugin add rust https://github.com/code-lever/asdf-rust.git
RUN asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
# Create directories for languages installations
RUN mkdir -p /home/docs/.asdf/installs/pipx && \
mkdir -p /home/docs/.asdf/installs/python && \
mkdir -p /home/docs/.asdf/installs/nodejs && \
mkdir -p /home/docs/.asdf/installs/rust && \
mkdir -p /home/docs/.asdf/installs/golang && \
mkdir -p /home/docs/.asdf/installs/ruby
# Adding labels for external usage
LABEL asdf.branch=$ROD_ASDF_BRANCH
# Upgrade asdf version manager
# https://github.com/asdf-vm/asdf
RUN asdf update
RUN asdf plugin update --all
RUN asdf version
# ############################################################################
#
# AMD/x86 64-bit architecture maintenance
#
# ############################################################################
FROM base AS build-amd64
# ############################################################################
#
# Rust runtime versions
#
# Install Rust versions
RUN asdf install rust $ROD_RUST_VERSION_2022 && \
asdf global rust $ROD_RUST_VERSION_2022 && \
asdf reshim rust
RUN asdf install rust $ROD_RUST_VERSION_2023 && \
asdf global rust $ROD_RUST_VERSION_2023 && \
asdf reshim rust
RUN asdf install rust $ROD_RUST_VERSION_2024 && \
asdf global rust $ROD_RUST_VERSION_2024 && \
asdf reshim rust
# Adding labels for external usage
LABEL rust.version_2022=$ROD_RUST_VERSION_2022
LABEL rust.version_2023=$ROD_RUST_VERSION_2023
LABEL rust.version_2024=$ROD_RUST_VERSION_2024
# Set default Rust version
RUN asdf local rust $ROD_RUST_VERSION_2024
RUN asdf list rust
# ############################################################################
#
# Golang runtime versions
#
# Install Golang versions
RUN asdf install golang $ROD_GOLANG_VERSION_2022 && \
asdf global golang $ROD_GOLANG_VERSION_2022 && \
asdf reshim golang
RUN asdf install golang $ROD_GOLANG_VERSION_2023 && \
asdf global golang $ROD_GOLANG_VERSION_2023 && \
asdf reshim golang
RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \
asdf global golang $ROD_GOLANG_VERSION_2024 && \
asdf reshim golang
# Adding labels for external usage
LABEL golang.version_2022=$ROD_GOLANG_VERSION_2022
LABEL golang.version_2023=$ROD_GOLANG_VERSION_2023
LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024
# Set default Golang version
RUN asdf local golang $ROD_GOLANG_VERSION_2024
RUN asdf list golang
# ############################################################################
#
# Node.js runtime versions
#
# Install Node.js versions
RUN asdf install nodejs $ROD_NODEJS_VERSION_18 && \
asdf global nodejs $ROD_NODEJS_VERSION_18 && \
asdf reshim nodejs
RUN asdf install nodejs $ROD_NODEJS_VERSION_20 && \
asdf global nodejs $ROD_NODEJS_VERSION_20 && \
asdf reshim nodejs
RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \
asdf global nodejs $ROD_NODEJS_VERSION_22 && \
asdf reshim nodejs
# Adding labels for external usage
LABEL nodejs.version_18=$ROD_NODEJS_VERSION_18
LABEL nodejs.version_20=$ROD_NODEJS_VERSION_20
LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22
# Set default Node.js version
RUN asdf local nodejs $ROD_NODEJS_VERSION_22
RUN asdf list nodejs
# ############################################################################
#
# Ruby runtime versions
#
# Install Ruby versions
RUN asdf install ruby $ROD_RUBY_VERSION_31 && \
asdf global ruby $ROD_RUBY_VERSION_31 && \
asdf reshim ruby
RUN asdf install ruby $ROD_RUBY_VERSION_32 && \
asdf global ruby $ROD_RUBY_VERSION_32 && \
asdf reshim ruby
RUN asdf install ruby $ROD_RUBY_VERSION_33 && \
asdf global ruby $ROD_RUBY_VERSION_33 && \
asdf reshim ruby
# Adding labels for external usage
LABEL ruby.version_31=$ROD_RUBY_VERSION_31
LABEL ruby.version_32=$ROD_RUBY_VERSION_32
LABEL ruby.version_33=$ROD_RUBY_VERSION_33
# Set default Ruby version
RUN asdf local ruby $ROD_RUBY_VERSION_33
RUN asdf list ruby
# ############################################################################
#
# Python and PyPy runtime versions
#
# Install Python versions
RUN asdf install python $ROD_PYTHON_VERSION_27 && \
asdf global python $ROD_PYTHON_VERSION_27 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_310 && \
asdf global python $ROD_PYTHON_VERSION_310 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_312 && \
asdf global python $ROD_PYTHON_VERSION_312 && \
asdf reshim python
RUN asdf install python $ROD_PYPY_VERSION_2 && \
asdf global python $ROD_PYPY_VERSION_2 && \
asdf reshim python
RUN asdf install python $ROD_PYPY_VERSION_3 && \
asdf global python $ROD_PYPY_VERSION_3 && \
asdf reshim python
# Python2 dependencies are hardcoded because Python2 is
# deprecated. Updating them to their latest versions may raise
# incompatibility issues.
RUN asdf local python $ROD_PYTHON_VERSION_27 && \
pip install --upgrade pip==20.3.4 && \
pip install --upgrade setuptools==44.1.1 && \
pip install --upgrade virtualenv==20.15.1 && \
pip install --upgrade wheel==0.37.1 && \
pip install --upgrade poetry==1.1.15 && \
pip install --only-binary numpy,scipy numpy==1.16.6 scipy==1.2.3 && \
pip install --only-binary pandas,matplotlib pandas==0.24.2 matplotlib==2.2.5
RUN asdf local python $ROD_PYPY_VERSION_2 && \
pip install --upgrade pip==20.3.4 && \
pip install --upgrade setuptools==44.1.1 && \
pip install --upgrade virtualenv==20.15.1 && \
pip install --upgrade wheel==0.37.1 && \
pip install --upgrade poetry==1.1.15
# Install Python package versions
RUN asdf local python $ROD_PYTHON_VERSION_310 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION && \
pip install --only-binary numpy,scipy numpy scipy && \
pip install --only-binary pandas,matplotlib pandas matplotlib
RUN asdf local python $ROD_PYTHON_VERSION_312 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION && \
pip install --only-binary numpy,scipy numpy scipy && \
pip install --only-binary pandas,matplotlib pandas matplotlib
RUN asdf local python $ROD_PYPY_VERSION_3 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION
# Adding labels for external usage
LABEL python.version_27=$ROD_PYTHON_VERSION_27
LABEL python.version_310=$ROD_PYTHON_VERSION_310
LABEL python.version_312=$ROD_PYTHON_VERSION_312
LABEL pypy.version_2=$ROD_PYPY_VERSION_2
LABEL pypy.version_3=$ROD_PYPY_VERSION_3
LABEL python.pip=$ROD_PIP_VERSION
LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION
LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION
LABEL python.wheel=$ROD_WHEEL_VERSION
LABEL python.poetry=$ROD_POETRY_VERSION
LABEL python.west=$ROD_WEST_VERSION
# Set default Python version
RUN asdf local python $ROD_PYTHON_VERSION_312
RUN asdf list python
# ############################################################################
#
# ARMv7 32-bit architecture maintenance
#
# ############################################################################
FROM base AS build-arm
# ############################################################################
#
# Rust runtime versions
#
# Install Rust versions
RUN asdf install rust $ROD_RUST_VERSION_2024 && \
asdf global rust $ROD_RUST_VERSION_2024 && \
asdf reshim rust
# Adding labels for external usage
LABEL rust.version_2024=$ROD_RUST_VERSION_2024
# Set default Rust version
RUN asdf local rust $ROD_RUST_VERSION_2024
RUN asdf list rust
# ############################################################################
#
# Golang runtime versions
#
# Install Golang versions
RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \
asdf global golang $ROD_GOLANG_VERSION_2024 && \
asdf reshim golang
# Adding labels for external usage
LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024
# Set default Golang version
RUN asdf local golang $ROD_GOLANG_VERSION_2024
RUN asdf list golang
# ############################################################################
#
# Node.js runtime versions
#
# Install Node.js versions
RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \
asdf global nodejs $ROD_NODEJS_VERSION_22 && \
asdf reshim nodejs
# Adding labels for external usage
LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22
# Set default Node.js version
RUN asdf local nodejs $ROD_NODEJS_VERSION_22
RUN asdf list nodejs
# ############################################################################
#
# Ruby runtime versions
#
# Install Ruby versions
RUN asdf install ruby $ROD_RUBY_VERSION_33 && \
asdf global ruby $ROD_RUBY_VERSION_33 && \
asdf reshim ruby
# Adding labels for external usage
LABEL ruby.version_33=$ROD_RUBY_VERSION_33
# Set default Ruby version
RUN asdf local ruby $ROD_RUBY_VERSION_33
RUN asdf list ruby
# ############################################################################
#
# Python and PyPy runtime versions
#
# Install Python versions
RUN asdf install python $ROD_PYTHON_VERSION_27 && \
asdf global python $ROD_PYTHON_VERSION_27 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_310 && \
asdf global python $ROD_PYTHON_VERSION_310 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_312 && \
asdf global python $ROD_PYTHON_VERSION_312 && \
asdf reshim python
# Python2 dependencies are hardcoded because Python2 is
# deprecated. Updating them to their latest versions may raise
# incompatibility issues.
RUN asdf local python $ROD_PYTHON_VERSION_27 && \
pip install --upgrade pip==20.3.4 && \
pip install --upgrade setuptools==44.1.1 && \
pip install --upgrade virtualenv==20.15.1 && \
pip install --upgrade wheel==0.37.1 && \
pip install --upgrade poetry==1.1.15
# Install Python package versions
RUN asdf local python $ROD_PYTHON_VERSION_310 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION
RUN asdf local python $ROD_PYTHON_VERSION_312 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION
# Adding labels for external usage
LABEL python.version_27=$ROD_PYTHON_VERSION_27
LABEL python.version_310=$ROD_PYTHON_VERSION_310
LABEL python.version_312=$ROD_PYTHON_VERSION_312
LABEL python.pip=$ROD_PIP_VERSION
LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION
LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION
LABEL python.wheel=$ROD_WHEEL_VERSION
LABEL python.poetry=$ROD_POETRY_VERSION
LABEL python.west=$ROD_WEST_VERSION
# Set default Python version
RUN asdf local python $ROD_PYTHON_VERSION_312
RUN asdf list python
# ############################################################################
#
# ARMv8 64-bit architecture maintenance
#
# ############################################################################
FROM base AS build-arm64
# ############################################################################
#
# Rust runtime versions
#
# Install Rust versions
RUN asdf install rust $ROD_RUST_VERSION_2024 && \
asdf global rust $ROD_RUST_VERSION_2024 && \
asdf reshim rust
# Adding labels for external usage
LABEL rust.version_2024=$ROD_RUST_VERSION_2024
# Set default Rust version
RUN asdf local rust $ROD_RUST_VERSION_2024
RUN asdf list rust
# ############################################################################
#
# Golang runtime versions
#
# HOTFIX: Avoid silent failure, with reason inside of curl
# <- curl: (55) Send failure: Broken pipe
# <- OpenSSL SSL_write: Broken pipe, errno 32
RUN echo "--insecure" > /home/docs/.curlrc
# Install Golang versions
RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \
asdf global golang $ROD_GOLANG_VERSION_2024 && \
asdf reshim golang
# HOTFIX: Revert silent failure hotfix from above
RUN rm -f /home/docs/.curlrc
# Adding labels for external usage
LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024
# Set default Golang version
RUN asdf local golang $ROD_GOLANG_VERSION_2024
RUN asdf list golang
# ############################################################################
#
# Node.js runtime versions
#
# Install Node.js versions
RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \
asdf global nodejs $ROD_NODEJS_VERSION_22 && \
asdf reshim nodejs
# Adding labels for external usage
LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22
# Set default Node.js version
RUN asdf local nodejs $ROD_NODEJS_VERSION_22
RUN asdf list nodejs
# ############################################################################
#
# Ruby runtime versions
#
# Install Ruby versions
RUN asdf install ruby $ROD_RUBY_VERSION_33 && \
asdf global ruby $ROD_RUBY_VERSION_33 && \
asdf reshim ruby
# Adding labels for external usage
LABEL ruby.version_33=$ROD_RUBY_VERSION_33
# Set default Ruby version
RUN asdf local ruby $ROD_RUBY_VERSION_33
RUN asdf list ruby
# ############################################################################
#
# Python and PyPy runtime versions
#
# Install Python versions
RUN asdf install python $ROD_PYTHON_VERSION_27 && \
asdf global python $ROD_PYTHON_VERSION_27 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_310 && \
asdf global python $ROD_PYTHON_VERSION_310 && \
asdf reshim python
RUN asdf install python $ROD_PYTHON_VERSION_312 && \
asdf global python $ROD_PYTHON_VERSION_312 && \
asdf reshim python
# Python2 dependencies are hardcoded because Python2 is
# deprecated. Updating them to their latest versions may raise
# incompatibility issues.
RUN asdf local python $ROD_PYTHON_VERSION_27 && \
pip install --upgrade pip==20.3.4 && \
pip install --upgrade setuptools==44.1.1 && \
pip install --upgrade virtualenv==20.15.1 && \
pip install --upgrade wheel==0.37.1 && \
pip install --upgrade poetry==1.1.15
# Install Python package versions
RUN asdf local python $ROD_PYTHON_VERSION_310 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION
RUN asdf local python $ROD_PYTHON_VERSION_312 && \
pip install --upgrade pip==$ROD_PIP_VERSION && \
pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \
pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \
pip install --upgrade wheel==$ROD_WHEEL_VERSION && \
pip install --upgrade poetry==$ROD_POETRY_VERSION && \
pip install --upgrade west==$ROD_WEST_VERSION
# Adding labels for external usage
LABEL python.version_27=$ROD_PYTHON_VERSION_27
LABEL python.version_310=$ROD_PYTHON_VERSION_310
LABEL python.version_312=$ROD_PYTHON_VERSION_312
LABEL python.pip=$ROD_PIP_VERSION
LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION
LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION
LABEL python.wheel=$ROD_WHEEL_VERSION
LABEL python.poetry=$ROD_POETRY_VERSION
LABEL python.west=$ROD_WEST_VERSION
# Set default Python version
RUN asdf local python $ROD_PYTHON_VERSION_312
RUN asdf list python
# ############################################################################
#
# RISC-V 64-bit architecture maintenance
#
# ############################################################################
FROM base AS build-riscv64
# ############################################################################
#
# Rust runtime versions
#
# Install Rust versions
RUN asdf install rust $ROD_RUST_VERSION_2024 && \
asdf global rust $ROD_RUST_VERSION_2024 && \
asdf reshim rust
# Adding labels for external usage
LABEL rust.version_2024=$ROD_RUST_VERSION_2024
# Set default Rust version
RUN asdf local rust $ROD_RUST_VERSION_2024
RUN asdf list rust
# ############################################################################
#
# Golang runtime versions
#
# Install Golang versions
RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \
asdf global golang $ROD_GOLANG_VERSION_2024 && \
asdf reshim golang
# Adding labels for external usage
LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024