BAEL-4316 Sample apps to showcase how to add files from outside docker context (#11606)

* BAEL-4316 Sample apps to showcase how to add files from outside docker context

* BAEL-4316 update README content

* BAEL-4316 change example

* BAEL-4316 update docker file

* BAEL-4316 revert the README changes

* BAEL-4316 change directory structure

* BAEL-4316 deleted old files

Co-authored-by: Swapan Pramanick <swapan.pramanick@zalando.de>
This commit is contained in:
Swapan Pramanick 2022-02-22 10:19:48 +01:00 committed by GitHub
parent 39c8314079
commit c8231b7c60
7 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,2 @@
FROM nginx:latest
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -0,0 +1,8 @@
events {}
http {
server {
listen 80;
index index.html;
}
}

View File

@ -0,0 +1,3 @@
FROM nginx:latest
COPY sample-site/html/* /etc/nginx/html/
COPY config/nginx.conf /etc/nginx/nginx.conf

View File

@ -0,0 +1,2 @@
FROM sample-site-base:latest
COPY html/* /etc/nginx/html/

View File

@ -0,0 +1,3 @@
FROM nginx:latest
COPY html/* /etc/nginx/html/
COPY config/nginx.conf /etc/nginx/nginx.conf

View File

@ -0,0 +1,6 @@
mkdir tmp-context
cp -R ../html tmp-context/
cp -R ../../config tmp-context/
cp Dockerfile-script tmp-context/Dockerfile
docker build -t sample-site:latest tmp-context
rm -rf tmp-context

View File

@ -0,0 +1,10 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sample Site</title>
</head>
<body>
<h2>Welcome to the first page of the site</h2>
</body>
</html>