File tree Expand file tree Collapse file tree 5 files changed +84
-0
lines changed
lib/native-package-installer Expand file tree Collapse file tree 5 files changed +84
-0
lines changed Original file line number Diff line number Diff line change 1010 matrix :
1111 distribution :
1212 - almalinux-9
13+ - alpine-linux
1314 - alt-linux
1415 - amazon-linux-2
1516 - amazon-linux-2023
Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ services:
2727 command :
2828 /native-package-installer/dockerfiles/run-test.sh
2929
30+ alpine-linux :
31+ build :
32+ context : .
33+ dockerfile : dockerfiles/alpine-linux.dockerfile
34+ volumes :
35+ - .:/native-package-installer:delegated
36+ command :
37+ /native-package-installer/dockerfiles/run-test.sh
38+
3039 alt-linux :
3140 build :
3241 context : .
Original file line number Diff line number Diff line change 1+ FROM alpine
2+
3+ RUN \
4+ apk update && apk upgrade && \
5+ apk add \
6+ bash \
7+ build-base \
8+ gcc \
9+ make \
10+ ruby \
11+ ruby-dev \
12+ openssl \
13+ openssl-dev \
14+ zlib \
15+ zlib-dev \
16+ sudo \
17+ which
18+
19+ RUN \
20+ gem install --no-user-install \
21+ bundler \
22+ rake
23+
24+ RUN \
25+ adduser native-package-installer -G wheel -D -h /home/native-package-installer
26+
27+ RUN \
28+ echo "native-package-installer ALL=(ALL:ALL) NOPASSWD:ALL" | \
29+ EDITOR=tee visudo -f /etc/sudoers.d/native-package-installer
30+
31+ USER native-package-installer
32+ WORKDIR /home/native-package-installer
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ def detect
5757
5858require_relative "platform/suse"
5959
60+ require_relative "platform/alpine-linux"
6061
6162# Windows
6263require_relative "platform/msys2"
Original file line number Diff line number Diff line change 1+ # Copyright (C) 2023 Ruby-GNOME Project Team
2+ #
3+ # This library is free software: you can redistribute it and/or modify
4+ # it under the terms of the GNU Lesser General Public License as published by
5+ # the Free Software Foundation, either version 3 of the License, or
6+ # (at your option) any later version.
7+ #
8+ # This program is distributed in the hope that it will be useful,
9+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ # GNU Lesser General Public License for more details.
12+ #
13+ # You should have received a copy of the GNU Lesser General Public License
14+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+ class NativePackageInstaller
17+ module Platform
18+ class AlpineLinux
19+ Platform . register ( self )
20+
21+ class << self
22+ def current_platform?
23+ os_release = OSRelease . new
24+ os_release . id == "alpine"
25+ end
26+ end
27+
28+ def package ( spec )
29+ spec [ :alpine_linux ]
30+ end
31+
32+ def install_command
33+ "apk add"
34+ end
35+
36+ def need_super_user_priviledge?
37+ true
38+ end
39+ end
40+ end
41+ end
You can’t perform that action at this time.
0 commit comments