Skip to content

Instantly share code, notes, and snippets.

@oceanapplications
Last active July 20, 2021 00:43
Show Gist options
  • Save oceanapplications/0c1a34c57b2493992b5c78f95c5fa8d9 to your computer and use it in GitHub Desktop.
Save oceanapplications/0c1a34c57b2493992b5c78f95c5fa8d9 to your computer and use it in GitHub Desktop.
Building a basic container
FROM nginx:1.21.0
RUN rm -rf /etc/nginx/conf.d/default.conf
ADD index.html /var/www/html/index.html
ADD nginx.conf /etc/nginx/conf.d/nginx.conf
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello Kubernetes</title>
</head>
<body>
Hello from Kubernetes.
<br>
This is nginx serving a static asset.
</body>
</html>
server {
index index.php index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment