Skip to content

Commit 877387b

Browse files
authored
fix: dont use --from=src (#19)
2 parents 1f67da3 + 36a9909 commit 877387b

File tree

18 files changed

+150
-35
lines changed

18 files changed

+150
-35
lines changed

.github/workflows/docker-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ jobs:
118118
matrix:
119119
image:
120120
- grunt
121-
- rails
122121
- jq
123122
- goaccess
124123
steps:
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build Rails Docker Images
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- "rails/**/Dockerfile"
8+
- ".github/workflows/rails-docker-build.yml"
9+
pull_request:
10+
branches: [master]
11+
paths:
12+
- "rails/**/Dockerfile"
13+
- ".github/workflows/rails-docker-build.yml"
14+
workflow_dispatch:
15+
16+
jobs:
17+
build-rails:
18+
name: Build Rails Images
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
include:
23+
- rails-version: '6' # Rails 6
24+
is-latest: false
25+
- rails-version: '7' # Rails 7
26+
is-latest: false
27+
- rails-version: '8' # Rails 8
28+
is-latest: true
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Login to Docker Hub
36+
if: github.event_name != 'pull_request'
37+
uses: docker/login-action@v3
38+
with:
39+
username: ${{ secrets.DOCKER_USERNAME }}
40+
password: ${{ secrets.DOCKER_PASSWORD }}
41+
42+
- name: Generate Docker metadata
43+
id: meta
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: voxxit/rails
47+
tags: |
48+
type=raw,value=${{ matrix.rails-version }}
49+
type=raw,value=latest,enable=${{ matrix.is-latest == true }}
50+
51+
- name: Build and push
52+
uses: docker/build-push-action@v5
53+
with:
54+
context: ./rails/${{ matrix.rails-version }}
55+
push: ${{ github.event_name != 'pull_request' }}
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}
58+
cache-from: type=gha
59+
cache-to: type=gha,mode=max

apt-mirror/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ ENV SLEEP_SECS 3600
4141

4242
VOLUME ["${BASE_PATH}"]
4343

44-
COPY --from=src ./resources/apt/mirror.list.template /etc/apt/
45-
COPY --from=src ./resources/apt/post-mirror.sh ${VAR_PATH}/
46-
COPY --from=src ./resources/docker-entrypoint.sh /docker-entrypoint.sh
44+
COPY ./resources/apt/mirror.list.template /etc/apt/
45+
COPY ./resources/apt/post-mirror.sh ${VAR_PATH}/
46+
COPY ./resources/docker-entrypoint.sh /docker-entrypoint.sh
4747

4848
ENTRYPOINT ["/docker-entrypoint.sh"]

bind/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM alpine:3.21
22

33
RUN apk add --no-cache bind bind-doc bind-tools
44

5-
COPY --from=src etc/bind/ /etc/bind/
6-
COPY --from=src entrypoint.sh /sbin/entrypoint.sh
5+
COPY etc/bind/ /etc/bind/
6+
COPY entrypoint.sh /sbin/entrypoint.sh
77

88
EXPOSE 53/tcp 53/udp
99

icecast/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ RUN addgroup -g 1000 icecast \
1919
&& install -d -o icecast -g icecast /etc/icecast \
2020
&& chown -R icecast:icecast /usr/share/icecast
2121

22-
COPY --from=src etc/mime.types /etc/
22+
COPY etc/mime.types /etc/
2323

2424
USER icecast:icecast
2525

26-
COPY --from=src etc/icecast.xml /etc/icecast/
27-
COPY --from=src docker-entrypoint.sh /
26+
COPY etc/icecast.xml /etc/icecast/
27+
COPY docker-entrypoint.sh /
2828

2929
CMD [ "/docker-entrypoint.sh" ]

liquidsoap/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL org.opencontainers.image.authors="[email protected]"
44

55
ENV LIQUIDSOAP_VERSION="2.2.0"
66

7-
COPY --from=src install.sh /tmp/install.sh
7+
COPY install.sh /tmp/install.sh
88

99
RUN chmod +x /tmp/install.sh \
1010
&& /tmp/install.sh "${LIQUIDSOAP_VERSION}" \
@@ -28,7 +28,7 @@ VOLUME [ "/media", "/var/log/liquidsoap" ]
2828

2929
EXPOSE 10000/tcp
3030

31-
COPY --chown=1001:1001 --from=src start-liquidsoap.sh /usr/bin/start-liquidsoap.sh
31+
COPY --chown=1001:1001 start-liquidsoap.sh /usr/bin/start-liquidsoap.sh
3232
USER 1001:1001
3333

3434
ENTRYPOINT [ "/usr/bin/start-liquidsoap.sh" ]

memcached/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL org.opencontainers.image.authors="[email protected]"
44

55
ENV HOME /root
66

7-
COPY --from=src start /start
7+
COPY start /start
88

99
RUN apt-get update && \
1010
apt-get install -y memcached sasl2-bin pwgen && \

nginx-geoip2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:jammy
22

3-
COPY --from=src . /
3+
COPY . /
44

55
RUN export DEBIAN_FRONTEND=noninteractive \
66
&& apt-get update \

nginx-http2/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@ LABEL org.opencontainers.image.authors="[email protected]"
44

55
EXPOSE 80/tcp 443/tcp
66

7-
ENV NGINX_VERSION 1.15.12
7+
ENV NGINX_VERSION 1.26.3
88

9-
RUN apk add --no-cache openssl-dev pcre-dev zlib-dev build-base \
9+
RUN apk add --no-cache openssl-dev~=3.3 pcre-dev zlib-dev build-base \
1010
&& wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz \
1111
&& tar -xzvf nginx-${NGINX_VERSION}.tar.gz \
1212
&& cd nginx-${NGINX_VERSION} \
1313
&& ./configure \
14-
--with-http_v2_module \
15-
--with-http_ssl_module \
16-
--with-http_realip_module \
17-
--with-http_stub_status_module \
18-
--with-threads \
19-
--with-ipv6 \
14+
--with-http_v2_module \
15+
--with-http_ssl_module \
16+
--with-openssl-opt=enable-tls1_3 \
17+
--with-http_realip_module \
18+
--with-http_stub_status_module \
19+
--with-threads \
20+
--with-ipv6 \
2021
&& make -j$(getconf _NPROCESSORS_ONLN) \
2122
&& make install \
2223
&& apk del build-base \
2324
&& rm -rf /nginx-*
2425

25-
COPY --from=src nginx.conf /usr/local/nginx/conf/nginx.conf
26+
COPY nginx.conf /usr/local/nginx/conf/nginx.conf
2627

2728
VOLUME [ "/usr/local/nginx/logs", "/usr/local/nginx/html", "/usr/local/nginx/conf" ]
2829

nginx-rtmp/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN apt-get update \
2626
RUN ln -sf /dev/stdout /usr/local/nginx/logs/access.log \
2727
&& ln -sf /dev/stderr /usr/local/nginx/logs/error.log
2828

29-
COPY --from=src conf/nginx.conf /usr/local/nginx/conf/
29+
COPY conf/nginx.conf /usr/local/nginx/conf/
3030

3131
EXPOSE 80/tcp 1935/tcp
3232

0 commit comments

Comments
 (0)