Created
April 14, 2020 20:40
-
-
Save mklasen/6c53d80224398beeec86d4a36119d01d to your computer and use it in GitHub Desktop.
Dockerfile nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# Update and install software-properties-common (for some reason) | |
RUN apt update && apt upgrade -y && \ | |
apt-get install software-properties-common -y | |
# Add repo's (whyuuut) | |
RUN add-apt-repository ppa:nginx/stable && \ | |
add-apt-repository ppa:jonathonf/ffmpeg-4 | |
# Install base. | |
RUN apt update && apt upgrade -y && \ | |
apt-get install build-essential perl libperl-dev libgd3 libgd-dev libgeoip1 libgeoip-dev geoip-bin libxml2 libxml2-dev libxslt1.1 libxslt1-dev wget libssl-dev nginx libnginx-mod-rtmp ffmpeg -y && \ | |
mkdir /setup && cd /setup | |
# Define mountable directories. | |
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html", "/etc/nginx/modules-enabled/"] | |
RUN mkdir /opt/data && mkdir /opt/data/hls | |
# Define default command. | |
CMD ["nginx", "-g", "daemon off;"] | |
# Expose ports. | |
EXPOSE 80 | |
EXPOSE 443 | |
EXPOSE 1935 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment