Skip to content

Commit a71687c

Browse files
authored
Merge pull request #50 from devilbox/release-0.44
Add Alpine Docker flavour
2 parents 1222e88 + 4dedd72 commit a71687c

29 files changed

+147
-7
lines changed

.github/workflows/action_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# (2/2) Build
2323
docker:
2424
needs: [params]
25-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
25+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2626
with:
2727
enabled: true
2828
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}

.github/workflows/action_pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# (2/2) Build
2525
docker:
2626
needs: [params]
27-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2828
with:
2929
enabled: true
3030
can_deploy: false

.github/workflows/action_schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# (2/2) Build
2525
docker:
2626
needs: [params]
27-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2828
with:
2929
enabled: true
3030
can_deploy: true

.github/workflows/params.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
{
1616
"NAME": "Nginx",
1717
"VERSION": ["mainline"],
18+
"FLAVOUR": ["latest", "debian", "alpine"],
1819
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"]
1920
}
2021
]

Dockerfiles/Dockerfile.alpine

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
FROM nginx:mainline-alpine
2+
MAINTAINER "cytopia" <cytopia@everythingcli.org>
3+
4+
LABEL \
5+
name="cytopia's nginx mainline image" \
6+
image="devilbox/nginx-mainline" \
7+
vendor="devilbox" \
8+
license="MIT"
9+
10+
11+
###
12+
### Build arguments
13+
###
14+
ARG VHOST_GEN_GIT_REF=1.0.3
15+
ARG WATCHERD_GIT_REF=v1.0.2
16+
ARG CERT_GEN_GIT_REF=0.7
17+
18+
ENV BUILD_DEPS \
19+
make \
20+
wget
21+
22+
ENV RUN_DEPS \
23+
ca-certificates \
24+
bash \
25+
openssl \
26+
py3-yaml \
27+
shadow \
28+
supervisor
29+
30+
31+
###
32+
### Runtime arguments
33+
###
34+
ENV MY_USER=nginx
35+
ENV MY_GROUP=nginx
36+
ENV HTTPD_START="/usr/sbin/nginx"
37+
ENV HTTPD_RELOAD="nginx -s stop"
38+
39+
40+
###
41+
### Install required packages
42+
###
43+
RUN set -eux \
44+
&& apk add --no-cache \
45+
${BUILD_DEPS} \
46+
${RUN_DEPS} \
47+
\
48+
# Install vhost-gen
49+
&& wget --no-check-certificate -O vhost-gen.tar.gz "https://github.com/devilbox/vhost-gen/archive/refs/tags/${VHOST_GEN_GIT_REF}.tar.gz" \
50+
&& tar xvfz vhost-gen.tar.gz \
51+
&& cd "vhost-gen-${VHOST_GEN_GIT_REF}" \
52+
&& make install \
53+
&& cd .. \
54+
&& rm -rf vhost*gen* \
55+
\
56+
# Install cert-gen
57+
&& wget --no-check-certificate -O /usr/bin/ca-gen https://raw.githubusercontent.com/devilbox/cert-gen/${CERT_GEN_GIT_REF}/bin/ca-gen \
58+
&& wget --no-check-certificate -O /usr/bin/cert-gen https://raw.githubusercontent.com/devilbox/cert-gen/${CERT_GEN_GIT_REF}/bin/cert-gen \
59+
&& chmod +x /usr/bin/ca-gen \
60+
&& chmod +x /usr/bin/cert-gen \
61+
\
62+
# Install watcherd
63+
&& wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \
64+
&& chmod +x /usr/bin/watcherd \
65+
\
66+
# Clean-up
67+
&& apk del \
68+
${BUILD_DEPS}
69+
70+
71+
###
72+
### Create directories
73+
###
74+
# /docker-entrypoint.d/10-ipv6* was added by nginx to do some IPv6 magic (which breaks the image)
75+
RUN set -eux \
76+
&& rm -rf /docker-entrypoint.d || true \
77+
&& mkdir -p /etc/httpd-custom.d \
78+
&& mkdir -p /etc/httpd/conf.d \
79+
&& mkdir -p /etc/httpd/vhost.d \
80+
&& mkdir -p /var/www/default/htdocs \
81+
&& mkdir -p /shared/httpd \
82+
&& chmod 0775 /shared/httpd \
83+
&& chown ${MY_USER}:${MY_GROUP} /shared/httpd
84+
85+
86+
###
87+
### Symlink Python3 to Python
88+
###
89+
RUN set -eux \
90+
&& ln -sf /usr/bin/python3 /usr/bin/python
91+
92+
93+
###
94+
### Copy files
95+
###
96+
COPY ./data/nginx/nginx.conf /etc/nginx/nginx.conf
97+
COPY ./data/vhost-gen/main.yml /etc/vhost-gen/main.yml
98+
COPY ./data/vhost-gen/mass.yml /etc/vhost-gen/mass.yml
99+
COPY ./data/vhost-gen/templates-main /etc/vhost-gen/templates-main
100+
COPY ./data/create-vhost.sh /usr/local/bin/create-vhost.sh
101+
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
102+
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
103+
104+
105+
###
106+
### Ports
107+
###
108+
EXPOSE 80
109+
EXPOSE 443
110+
111+
112+
###
113+
### Volumes
114+
###
115+
VOLUME /shared/httpd
116+
VOLUME /ca
117+
118+
119+
###
120+
### Signals
121+
###
122+
STOPSIGNAL SIGTERM
123+
124+
125+
###
126+
### Entrypoint
127+
###
128+
ENTRYPOINT ["/docker-entrypoint.sh"]
File renamed without changes.

Dockerfiles/Dockerfile.latest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dockerfile.debian
File renamed without changes.

0 commit comments

Comments
 (0)