-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
169 lines (146 loc) · 4.72 KB
/
Copy pathDockerfile
File metadata and controls
169 lines (146 loc) · 4.72 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
158
159
160
161
162
163
164
165
166
167
168
169
FROM ghcr.io/actions/actions-runner:2.323.0
# Set noninteractive installation
ENV DEBIAN_FRONTEND=noninteractive
USER root
# Update and install core utilities
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
apt-utils \
apt-transport-https \
ca-certificates \
curl \
gnupg \
software-properties-common \
lsb-release \
wget \
zip \
unzip \
git \
sudo \
snapd
# Install basic system utilities
RUN apt-get install -y --no-install-recommends \
dpkg \
dpkg-dev \
fakeroot \
file \
findutils \
flex \
fonts-noto-color-emoji \
ftp \
g++ \
gcc-12 \
gnupg2 \
haveged \
iproute2 \
iputils-ping \
jq \
libsqlite3-dev \
libssl-dev \
libtool \
libyaml-dev \
locales \
lz4 \
m4 \
make \
mediainfo \
mercurial \
net-tools \
netcat \
openssh-client
# Make gcc-12 to default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
# Install development tools & languages
RUN apt-get install -y --no-install-recommends \
build-essential \
gdb \
valgrind \
python3 \
python3-dev \
python3-pip \
python3-venv \
python3-setuptools \
python3-wheel
# Install Clang versions
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
llvm \
clang \
clang-format \
clang-tidy
# Install Node.js 20.x
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm@10.8.2 yarn@1.22.22
# Install Ruby
RUN apt-get install -y --no-install-recommends \
ruby-full \
ruby-dev \
rubygems
# Install MySQL
RUN apt-get install -y --no-install-recommends \
mysql-server && \
echo "MySQL root password: root" && \
echo -e "[mysql]\nuser=root\npassword=root" > /root/.my.cnf && \
chmod 600 /root/.my.cnf
# Install Apache and Nginx
RUN apt-get install -y --no-install-recommends \
apache2 \
nginx
# Install PowerShell
# RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
# dpkg -i packages-microsoft-prod.deb && \
# apt-get update && \
# apt-get install -y powershell && \
# rm packages-microsoft-prod.deb
# Install Android SDK tools
# RUN mkdir -p /usr/local/lib/android && \
# cd /usr/local/lib/android && \
# wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \
# unzip commandlinetools-linux-*_latest.zip && \
# rm commandlinetools-linux-*_latest.zip && \
# mkdir -p /usr/local/lib/android/cmdline-tools/latest && \
# mv /usr/local/lib/android/cmdline-tools/* /usr/local/lib/android/cmdline-tools/latest/ || true && \
# cd /usr/local/lib/android/cmdline-tools/latest/bin && \
# yes | ./sdkmanager --licenses && \
# ./sdkmanager "platform-tools" "build-tools;34.0.0" "build-tools;35.0.0" "build-tools;35.0.1" "build-tools;36.0.0"
# Install Homebrew (not added to PATH by default)
RUN mkdir -p /home/linuxbrew && \
git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew && \
echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >> /etc/bash.bashrc && \
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >> /etc/bash.bashrc && \
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >> /etc/bash.bashrc
# Install Miniconda
# RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
# bash Miniconda3-latest-Linux-x86_64.sh -b -p /usr/share/miniconda && \
# rm Miniconda3-latest-Linux-x86_64.sh && \
# echo 'export PATH="/usr/share/miniconda/bin:$PATH"' >> /etc/bash.bashrc
# Install Vcpkg
RUN git clone https://github.com/Microsoft/vcpkg.git /usr/local/share/vcpkg && \
/usr/local/share/vcpkg/bootstrap-vcpkg.sh && \
echo 'export PATH="/usr/local/share/vcpkg:$PATH"' >> /etc/bash.bashrc && \
echo 'export VCPKG_INSTALLATION_ROOT="/usr/local/share/vcpkg"' >> /etc/bash.bashrc
# Create a dummy snap command to avoid "command not found" errors
RUN echo '#!/bin/bash\nexit 0' > /usr/local/bin/snap && \
chmod +x /usr/local/bin/snap
# Clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set up services to be disabled by default (same as GitHub runners)
RUN systemctl disable mysql.service apache2.service nginx.service || true
# Verify some key installations
RUN node --version && \
npm --version && \
python3 --version && \
pip3 --version && \
ruby --version && \
gem --version
# Default to bash shell
SHELL ["/bin/bash", "-c"]
USER runner
# Copy and make init.sh executable
COPY init.sh .
# Use shell as entrypoint for proper signal handling
ENTRYPOINT ["/bin/bash", "init.sh"]