forked from coderjun/docker-adobe-media-server
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
82 lines (71 loc) · 3.86 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM centos:7
MAINTAINER Sarah Allen <[email protected]>
#### Manual install instructions
# https://helpx.adobe.com/adobe-media-server/install/install-media-server.html
#### Download links
# http://download.macromedia.com/pub/adobemediaserver/5_0_10/AdobeMediaServer5_x64.tar.gz
# http://download.macromedia.com/pub/adobemediaserver/5_0_9/AdobeMediaServer5_x64.tar.gz
# http://download.macromedia.com/pub/adobemediaserver/5_0_8/AdobeMediaServer5_x64.tar.gz
# http://download.macromedia.com/pub/adobemediaserver/5_0_7/AdobeMediaServer5_x64.tar.gz
# http://download.macromedia.com/pub/adobemediaserver/5_0_6/AdobeMediaServer5_x64.tar.gz
# http://download.macromedia.com/pub/adobemediaserver/5_0_5/AdobeMediaServer5_x64.tar.gz
# 5.0.3 is different - http://download.macromedia.com/pub/adobemediaserver/AdobeMediaServer5_x64.tar.gz
ENV AMS_VERSION=5_1_17
##############################################################################
# yum install will update lists of available packages
# and install their fresh / current versions.
# Every time we build it may end up with different package versions
# which is intended for now.
# TODO: after finalizing dockerfile, should pin the versions of dependencies
RUN yum update -y && \
yum install -y tar epel-release && \
yum install -y expect && \
yum install -y openssl-devel && \
yum install -y openssl && \
yum install -y psmisc && \
yum clean all
##############################################################################
##### Install media server
WORKDIR /tmp/ams
# should have per version install.exp
# COPY conf/${AMS_VERSION}/installAMS.input installAMS.input
COPY install.exp .
# note 5.0.15 is labeled .tar.gz but not actually gzipped
RUN curl -O https://download.veriskope.com/AdobeMediaServer5.0.17b.tar.gz \
&& tar xvf AdobeMediaServer5.0.17b.tar.gz -C . --strip-components=1 \
&& rm -Rf License.txt \
&& sed -i -e 's:read cont < /dev/tty:#read cont < /dev/tty:g' installAMS \
&& sed -i -e 's:/sbin/sysctl:#/sbin/sysctl:g' server
RUN expect install.exp \
&& rm -rf /tmp/ams
##############################################################################
# TODO: Can we conditionalize? if we do this it should be late in the file
# ENV DO_COPY_ADAPTOR_XML=false
#COPY conf/${AMS_VERSION}/Adaptor.xml /opt/adobe/ams/conf/_defaultRoot_/Adaptor.xml
# VOLUME ["/opt/adobe/ams/applications"]
COPY ./ssl_self_signed_cert.conf /tmp/
RUN openssl req -x509 -out /localhost.crt -keyout /localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' \
-config /tmp/ssl_self_signed_cert.conf
RUN sed -i 's/ADAPTOR.HOSTPORT = :1935/ADAPTOR.HOSTPORT = :1935,-443/g' \
/opt/adobe/ams/conf/ams.ini \
&& sed -i -e 's/<SSLCertificateFile><\/SSLCertificateFile>/<SSLCertificateFile>\/localhost.crt<\/SSLCertificateFile>/g' \
-e 's/<SSLCertificateKeyFile type="PEM"><\/SSLCertificateKeyFile>/<SSLCertificateKeyFile type="PEM">\/localhost.key<\/SSLCertificateKeyFile>/g' \
/opt/adobe/ams/conf/_defaultRoot_/Adaptor.xml \
&& sed -i -e 's/<MaxSize>[0-9]*<\/MaxSize>/<MaxSize>1073741824<\/MaxSize>/g' \
-e 's/<Schedule type="[a-zA-Z]*">[0-9:]*<\/Schedule>/<Schedule type="duration">518400<\/Schedule>/g' \
-e 's/<History>[0-9]*<\/History>/<History>1<\/History>/g' \
-e 's/<Rename>.*<\/Rename>/<Rename>false<\/Rename>/g' \
/opt/adobe/ams/conf/Logger.xml \
# Ommit below from logging/output, just to avoid confusion
&& sed -i 's/ (please check \/var\/log\/messages)//g' \
/opt/adobe/ams/server \
&& sed -i 's/ (please check \/var\/log\/messages)//g' \
/opt/adobe/ams/adminserver
COPY lic/* /opt/adobe/ams/lic/
WORKDIR /opt/adobe/ams
# Need to map these to host ports with docker run / compose
EXPOSE 80 443 1111 1935
COPY ./start.sh /
CMD /start.sh