1
1
# The Arduino IDE Linux build workflow job runs in this container.
2
2
# syntax=docker/dockerfile:1
3
3
4
- FROM ubuntu:18.04
5
-
6
- # See: https://unofficial-builds.nodejs.org/download/release/
7
- ARG node_version="18.17.1"
4
+ # See: https://hub.docker.com/_/ubuntu/tags
5
+ FROM ubuntu:18.10
8
6
7
+ # This is required in order to use the Ubuntu package repositories for EOL Ubuntu versions:
8
+ # https://help.ubuntu.com/community/EOLUpgrades#Update_sources.list
9
9
RUN \
10
- apt-get \
11
- --yes \
12
- update
10
+ sed \
11
+ --in-place \
12
+ --regexp-extended \
13
+ --expression='s/([a-z]{2}\. )?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' \
14
+ "/etc/apt/sources.list"
13
15
14
- # This is required to get add-apt-repository
15
16
RUN \
16
17
apt-get \
17
18
--yes \
18
- install \
19
- "software-properties-common=0.96.24.32.22"
19
+ update
20
20
21
- # Install Git
22
- # The PPA is required to get a modern version of Git. The version in the Ubuntu 18.04 package repository is 2.17.1,
23
- # while action/checkout@v3 requires 2.18 or higher.
24
21
RUN \
25
- add-apt-repository \
26
- --yes \
27
- "ppa:git-core/ppa" && \
28
- apt-get \
29
- --yes \
30
- update && \
31
- \
32
22
apt-get \
33
23
--yes \
34
24
install \
35
- "git" && \
36
- \
37
- apt-get \
38
- --yes \
39
- purge \
40
- "software-properties-common"
25
+ "git"
41
26
42
27
# The repository path must be added to safe.directory, otherwise any Git operations on it would fail with a
43
28
# "dubious ownership" error. actions/checkout configures this, but it is not applied to containers.
@@ -51,62 +36,28 @@ ENV \
51
36
52
37
# Install Python
53
38
# The Python installed by actions/setup-python has dependency on a higher version of glibc than available in the
54
- # ubuntu:18.04 container.
39
+ # container.
55
40
RUN \
56
41
apt-get \
57
42
--yes \
58
43
install \
59
- "python3.8-minimal=3.8.0-3ubuntu1~18.04.2" && \
60
- \
61
- ln \
62
- --symbolic \
63
- --force \
64
- "$(which python3.8)" \
65
- "/usr/bin/python3"
44
+ "python3.7-minimal=3.7.3-2~18.10"
66
45
67
46
# Install Theia's package dependencies
68
47
# These are pre-installed in the GitHub Actions hosted runner machines.
69
48
RUN \
70
49
apt-get \
71
50
--yes \
72
51
install \
73
- "libsecret-1-dev=0.18.6-1 " \
74
- "libx11-dev=2:1.6.4-3ubuntu0.4 " \
52
+ "libsecret-1-dev=0.18.6-3 " \
53
+ "libx11-dev=2:1.6.7-1 " \
75
54
"libxkbfile-dev=1:1.0.9-2"
76
55
77
- # Install Node.js
78
- # It is necessary to use the "unofficial" linux-x64-glibc-217 build because the official Node.js 18.x is dynamically
79
- # linked against glibc 2.28, while Ubuntu 18.04 has glibc 2.27.
80
- ARG node_installation_path="/tmp/node-installation"
81
- ARG artifact_name="node-v${node_version}-linux-x64-glibc-217"
82
- RUN \
83
- mkdir "$node_installation_path" && \
84
- cd "$node_installation_path" && \
85
- \
86
- apt-get \
87
- --yes \
88
- install \
89
- "wget=1.19.4-1ubuntu2.2" && \
90
- \
91
- archive_name="${artifact_name}.tar.xz" && \
92
- wget \
93
- "https://unofficial-builds.nodejs.org/download/release/v${node_version}/${archive_name}" && \
94
- \
95
- apt-get \
96
- --yes \
97
- purge \
98
- "wget" && \
99
- \
100
- tar \
101
- --file="$archive_name" \
102
- --extract && \
103
- rm "$archive_name"
104
- ENV PATH="${PATH}:${node_installation_path}/${artifact_name}/bin"
105
-
106
- # Install Yarn
107
- # Yarn is pre-installed in the GitHub Actions hosted runner machines.
56
+ # Target python3 symlink to Python 3.7 installation. It would otherwise target version 3.6 due to the installation of
57
+ # the `python3` package as a transitive dependency.
108
58
RUN \
109
- npm \
110
- install \
111
- --global \
112
-
59
+ ln \
60
+ --symbolic \
61
+ --force \
62
+ "$(which python3.7)" \
63
+ "/usr/bin/python3"
0 commit comments