Skip to content

Commit c89e95c

Browse files
committed
Fix Node install & adopt fork GHA and readme
1 parent d51b0d3 commit c89e95c

File tree

3 files changed

+53
-134
lines changed

3 files changed

+53
-134
lines changed

.github/workflows/docker-build.yml

Lines changed: 45 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -7,145 +7,61 @@ on:
77

88
jobs:
99
build:
10-
name: alpinelab/ruby-dev:${{ matrix.ruby }}${{ matrix.variant }}
11-
runs-on: ubuntu-latest
10+
name: ruby-dev:${{ matrix.ruby }}${{ matrix.variant }}
1211
strategy:
12+
fail-fast: false
1313
matrix:
1414
ruby:
15-
- 3.3.1
16-
- 3.3.0
17-
- 3.2.4
18-
- 3.2.3
15+
- 3.3.5
16+
- 3.3.4
17+
- 3.2.5
1918
- 3.2.2
20-
- 3.2.1
21-
- 3.2.0
22-
- 3.1.5
23-
- 3.1.4
24-
- 3.1.3
25-
- 3.1.2
26-
- 3.1.1
27-
- 3.1.0
28-
- 3.0.7
29-
- 3.0.6
30-
- 3.0.5
31-
- 3.0.4
32-
- 3.0.3
33-
- 3.0.2
34-
- 3.0.1
35-
- 3.0.0
36-
- 2.7.8
37-
- 2.7.7
38-
- 2.7.6
39-
- 2.7.5
40-
- 2.7.4
41-
- 2.7.3
42-
- 2.7.2
43-
- 2.7.1
44-
- 2.7.0
45-
- 2.6.10
46-
- 2.6.9
47-
- 2.6.8
48-
- 2.6.7
49-
- 2.6.6
50-
- 2.6.5
51-
- 2.6.4
52-
- 2.6.3
53-
- 2.6.2
54-
- 2.6.1
55-
- 2.6.0
56-
- 2.5.9
57-
- 2.5.8
58-
- 2.5.7
59-
- 2.5.6
60-
- 2.5.5
61-
- 2.5.4
62-
- 2.5.3
63-
# Ruby 2.5.2 never existed: it was mis-packaged and 2.5.3 was released immediately to fix it
64-
- 2.5.1
65-
- 2.5.0
66-
- 2.4.10
67-
- 2.4.9
68-
- 2.4.8
69-
- 2.4.7
70-
- 2.4.6
71-
- 2.4.5
72-
- 2.4.4
73-
- 2.4.3
74-
- 2.4.2
75-
- 2.4.1
76-
- 2.4.0
77-
- 2.3.8
78-
- 2.3.7
79-
- 2.3.6
80-
- 2.3.5
81-
- 2.3.4
82-
- 2.3.3
83-
- 2.3.2
84-
- 2.3.1
85-
- 2.3.0
8619
variant: ["", "-alpine"]
20+
exclude: []
21+
include: []
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
8725

88-
exclude:
89-
# the following needs an explicit Alpine version, so we exlude them here and re-include them with explicit version below
90-
- { ruby: 2.4.3, variant: "-alpine" }
91-
- { ruby: 2.4.2, variant: "-alpine" }
92-
- { ruby: 2.4.1, variant: "-alpine"}
93-
# the following do not have an Alpine variant because Yarn is unavailable on their base Alpine version (< 3.6)
94-
- { ruby: 2.4.0, variant: "-alpine" }
95-
- { ruby: 2.3.6, variant: "-alpine" }
96-
- { ruby: 2.3.5, variant: "-alpine" }
97-
- { ruby: 2.3.4, variant: "-alpine" }
98-
- { ruby: 2.3.3, variant: "-alpine" }
99-
- { ruby: 2.3.2, variant: "-alpine" }
100-
- { ruby: 2.3.1, variant: "-alpine" }
101-
- { ruby: 2.3.0, variant: "-alpine" }
26+
- uses: docker/setup-buildx-action@v3
10227

103-
include:
104-
- ruby: 2.4.3
105-
variant: "-alpine3.7"
106-
- ruby: 2.4.2
107-
variant: "-alpine3.7"
108-
- ruby: 2.4.1
109-
variant: "-alpine3.6"
110-
steps:
111-
- uses: docker/setup-buildx-action@v2
112-
- uses: docker/login-action@v2
113-
with:
114-
username: ${{ secrets.DOCKERHUB_USERNAME }}
115-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
116-
- uses: docker/build-push-action@v2
117-
with:
118-
push: true
119-
build-args: |
120-
BASE_IMAGE_TAG=${{ matrix.ruby }}${{ matrix.variant }}
28+
- name: Login to DockerHub
29+
if: github.event_name != 'pull_request'
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKER_USERNAME }}
33+
password: ${{ secrets.DOCKER_PASSWORD }}
34+
35+
- name: Login to GitHub Container Registry
36+
if: github.event_name != 'pull_request'
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.repository_owner }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- uses: docker/build-push-action@v6
44+
with:
45+
push: ${{ github.event_name != 'pull_request' }}
46+
visibility: public
47+
build-args: |
48+
BASE_IMAGE_TAG=${{ matrix.ruby }}${{ matrix.variant }}
12149
122-
${{ startsWith(matrix.ruby, '2.5') && 'RUBYGEMS_VERSION_ARG=3.3.26' || '' }}
123-
${{ startsWith(matrix.ruby, '2.4') && 'RUBYGEMS_VERSION_ARG=3.3.26' || '' }}
124-
${{ startsWith(matrix.ruby, '2.3') && 'RUBYGEMS_VERSION_ARG=3.3.26' || '' }}
50+
tags: |
51+
hnhs/ruby-dev:${{ matrix.ruby }}${{ matrix.variant }}
52+
ghcr.io/hicknhack-software/ruby-dev:${{ matrix.ruby }}${{ matrix.variant }}
12553
126-
${{ startsWith(matrix.ruby, '2.5') && 'BUNDLER_VERSION_ARG=2.3.26' || '' }}
127-
${{ startsWith(matrix.ruby, '2.4') && 'BUNDLER_VERSION_ARG=2.3.26' || '' }}
128-
${{ startsWith(matrix.ruby, '2.3') && 'BUNDLER_VERSION_ARG=2.3.26' || '' }}
54+
${{ matrix.ruby == '3.3.5' && format('hnhs/ruby-dev:latest{0}', matrix.variant) || '' }}
55+
${{ matrix.ruby == '3.3.5' && format('ghcr.io/hicknhack-software/ruby-dev:latest{0}', matrix.variant) || '' }}
12956
130-
tags: |
131-
alpinelab/ruby-dev:${{ matrix.ruby }}${{ matrix.variant }}
57+
${{ matrix.ruby == '3.3.5' && format('hnhs/ruby-dev:3{0}', matrix.variant) || '' }}
58+
${{ matrix.ruby == '3.3.5' && format('ghcr.io/hicknhack-software/ruby-dev:3{0}', matrix.variant) || '' }}
13259
133-
${{ matrix.ruby == '3.3.1' && format('alpinelab/ruby-dev:latest{0}', matrix.variant) || '' }}
134-
${{ matrix.ruby == '3.3.1' && format('alpinelab/ruby-dev:3{0}', matrix.variant) || '' }}
135-
${{ matrix.ruby == '3.3.1' && format('alpinelab/ruby-dev:3.3{0}', matrix.variant) || '' }}
136-
${{ matrix.ruby == '3.2.4' && format('alpinelab/ruby-dev:3.2{0}', matrix.variant) || '' }}
137-
${{ matrix.ruby == '3.1.5' && format('alpinelab/ruby-dev:3.1{0}', matrix.variant) || '' }}
138-
${{ matrix.ruby == '3.0.7' && format('alpinelab/ruby-dev:3.0{0}', matrix.variant) || '' }}
139-
${{ matrix.ruby == '2.7.8' && format('alpinelab/ruby-dev:2.7{0}', matrix.variant) || '' }}
140-
${{ matrix.ruby == '2.7.8' && format('alpinelab/ruby-dev:2{0}', matrix.variant) || '' }}
141-
${{ matrix.ruby == '2.6.10' && format('alpinelab/ruby-dev:2.6{0}', matrix.variant) || '' }}
142-
${{ matrix.ruby == '2.5.9' && format('alpinelab/ruby-dev:2.5{0}', matrix.variant) || '' }}
143-
${{ matrix.ruby == '2.4.10' && format('alpinelab/ruby-dev:2.4{0}', matrix.variant) || '' }}
144-
${{ matrix.ruby == '2.3.8' && format('alpinelab/ruby-dev:2.3{0}', matrix.variant) || '' }}
60+
${{ matrix.ruby == '3.3.5' && format('hnhs/ruby-dev:3.3{0}', matrix.variant) || '' }}
61+
${{ matrix.ruby == '3.3.5' && format('ghcr.io/hicknhack-software/ruby-dev:3.3{0}', matrix.variant) || '' }}
14562
146-
${{ (matrix.ruby == '2.4.3' && matrix.variant == '-alpine3.7') && 'alpinelab/ruby-dev:2.4.3-alpine' || '' }}
147-
${{ (matrix.ruby == '2.4.2' && matrix.variant == '-alpine3.7') && 'alpinelab/ruby-dev:2.4.2-alpine' || '' }}
148-
${{ (matrix.ruby == '2.4.3' && matrix.variant == '-alpine3.6') && 'alpinelab/ruby-dev:2.4.1-alpine' || '' }}
63+
${{ matrix.ruby == '3.2.5' && format('ghcr.io/hicknhack-software/ruby-dev:3.2{0}', matrix.variant) || '' }}
64+
${{ matrix.ruby == '3.2.5' && format('hnhs/ruby-dev:3.2{0}', matrix.variant) || '' }}
14965
150-
cache-from: type=gha
151-
cache-to: type=gha,mode=max
66+
cache-from: type=gha
67+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ RUN set -eux; \
108108
jq \
109109
nano \
110110
nodejs \
111-
$([ "${debianReleaseCodename}" = "bookworm" ] && echo "npm") \
112111
postgresql-client \
113112
vim \
114113
; \

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# `alpinelab/ruby-dev` [![Docker Stars](https://img.shields.io/docker/stars/alpinelab/ruby-dev?style=flat-square)](https://hub.docker.com/r/alpinelab/ruby-dev/) [![Docker Pulls](https://img.shields.io/docker/pulls/alpinelab/ruby-dev.svg?style=flat-square)](https://hub.docker.com/r/alpinelab/ruby-dev/) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/alpinelab/docker-ruby-dev/docker-build.yml?style=flat-square)](https://github.com/alpinelab/docker-ruby-dev/actions/workflows/docker-build.yml)
1+
# `hnhs/ruby-dev`
2+
3+
A fork from `alpine-labs/ruby-dev`.
24

35
The main goal of this project is to have a single Docker image to develop all your Ruby projects, with **all dependencies contained inside Docker** (like gems, NPM packages or even Ruby itself, that won't pollute your host environment) and without anything specific to the project in the Docker image (the **codebase is mounted directly from the host filesystem into the container**, thus you'll never have to build the image when you add a gem or change some code).
46

@@ -33,7 +35,7 @@ volumes:
3335
config: { driver: local }
3436
services:
3537
app:
36-
image: alpinelab/ruby-dev
38+
image: hnhs/ruby-dev
3739
ports: ["5000:5000"]
3840
volumes:
3941
- .:/app
@@ -42,7 +44,7 @@ services:
4244
- config:/config
4345
```
4446
45-
> 💡 Feel free to use `alpinelab/ruby-dev:<ruby-version>`: we support [multiple Ruby versions](.github/workflows/docker-build.yml) [as Docker tags](https://hub.docker.com/r/alpinelab/ruby-dev/tags/)
47+
> 💡 Feel free to use `hnhs/ruby-dev:<ruby-version>`: we support [multiple Ruby versions](.github/workflows/docker-build.yml) [as Docker tags](https://hub.docker.com/r/hnhs/ruby-dev/tags/)
4648
> and Alpine Linux variants (append `-alpine` to image tag).
4749

4850
<details>
@@ -150,9 +152,11 @@ The following Ruby versions are not maintained anymore:
150152

151153
* Ruby 2.2 ([EOL](https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/)'d)
152154

155+
⚠️ Note: This fork only contains the latest Ruby versions to minimize the effort. Feel free to open an issue if you need a different Ruby version.
156+
153157
## Contributing
154158

155-
Contributions are indeed warmly welcome as [pull requests](https://github.com/alpinelab/docker-ruby-dev/pulls), or [issues](https://github.com/alpinelab/docker-ruby-dev/issues) ❤️
159+
Contributions are indeed warmly welcome as [pull requests](https://github.com/hicknhack-software/docker-ruby-dev/pulls), or [issues](https://github.com/hicknhack-software/docker-ruby-dev/issues) ❤️
156160

157161
## License
158162

0 commit comments

Comments
 (0)