Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2dffe7d

Browse files
committed
patch: updated Dockerfile
1 parent 8f0e6e6 commit 2dffe7d

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

‎Dockerfile‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
ARG NGINX_VERSION=1.21.6
22
ARG NGINX_HTTP_FLV_MODULE=1.2.10
3+
ARG HTTP_PORT=80
4+
ARG HTTPS_PORT=443
5+
ARG RTMP_PORT=1935
6+
ARG HTTP_FLV_MODULE=9000
37

48
###################################################
59
# Build this NGINX-build image.
610
FROM alpine:3.15.3 as build-nginx
711
ARG NGINX_VERSION
812
ARG NGINX_HTTP_FLV_MODULE
913

10-
WORKDIR /tmp
14+
WORKDIR /workspace
1115

1216
# Get nginx and Get nginx-http-flv-module
1317
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories\
@@ -19,12 +23,12 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
1923
&& tar -zxvf v${NGINX_HTTP_FLV_MODULE}.tar.gz\
2024
&& rm v${NGINX_HTTP_FLV_MODULE}.tar.gz
2125

22-
WORKDIR /tmp/nginx-${NGINX_VERSION}
26+
WORKDIR /workspace/nginx-${NGINX_VERSION}
2327

2428
RUN \
2529
./configure \
2630
--prefix=/usr/local/nginx \
27-
--add-module=/tmp/nginx-http-flv-module-${NGINX_HTTP_FLV_MODULE} \
31+
--add-module=/workspace/nginx-http-flv-module-${NGINX_HTTP_FLV_MODULE} \
2832
--conf-path=/etc/nginx/nginx.conf \
2933
--with-threads \
3034
--with-http_ssl_module \
@@ -38,13 +42,17 @@ RUN \
3842
# Build the release image.
3943
FROM alpine:3.15.3
4044

41-
ENV HTTP_PORT 80
42-
# ENV HTTPS_PORT 443
43-
ENV RTMP_PORT 1935
44-
ENV HTTP_FLV_MODULE 9000
45+
ARG HTTP_PORT
46+
ARGHTTPS_PORT
47+
ARG RTMP_PORT
48+
ARG HTTP_FLV_MODULE
4549

46-
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories\
47-
&& apk add --no-cache pcre-dev zlib-dev openssl openssl-dev gettext
50+
ENV HTTP_PORT ${HTTP_PORT}
51+
ENV HTTPS_PORT ${HTTPS_PORT}
52+
ENV RTMP_PORT ${RTMP_PORT}
53+
ENV HTTP_FLV_MODULE ${HTTP_FLV_MODULE}
54+
55+
RUN apk add --no-cache pcre-dev zlib-dev openssl openssl-dev gettext
4856

4957
COPY --from=build-nginx /usr/local/nginx /usr/local/nginx
5058
COPY --from=build-nginx /etc/nginx /etc/nginx
@@ -55,8 +63,9 @@ COPY nginx.conf /etc/nginx/nginx.conf
5563
RUN mkdir -p /opt/data && mkdir /www
5664
# COPY static /www/static
5765

58-
EXPOSE 9000
59-
EXPOSE 1935
6066
EXPOSE 80
67+
EXPOSE 443
68+
EXPOSE 1935
69+
EXPOSE 9000
6170

6271
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /