Building a basic container
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 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 |
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
<!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> |
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
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