Create a gist now

Instantly share code, notes, and snippets.

@dougbtv /Dockerfile
Last active May 18, 2017

What would you like to do?
A nginx image that serves pickle images
FROM centos:centos7
RUN yum install -y epel-release
RUN yum install -y nginx
ADD pickle-man.png /usr/share/nginx/html/pickle-man.png
ADD pickle.png /usr/share/nginx/html/pickle.png
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh
#!/bin/bash
cat << EOF > /usr/share/nginx/html/index.html
<!DOCTYPE html>
<html lang="en" >
<head>
<meta name="description"
content="application/xhtml+xml"/>
<meta charset="UTF-8"/>
<title>This is pickle-nginx</title>
</head>
<body>
<img src="${PICKLE_TYPE}.png" />
</body>
</html>
EOF
nginx -g 'daemon off;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment