Skip to content

Commit 576b617

Browse files
swapanpramanick2004Swapan Pramanick
andauthored
BAEL-4316 Sample apps to showcase how to add files from outside docker context (eugenp#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 <[email protected]>
1 parent 442805c commit 576b617

7 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:latest
2+
COPY nginx.conf /etc/nginx/nginx.conf
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
events {}
2+
3+
http {
4+
server {
5+
listen 80;
6+
index index.html;
7+
}
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx:latest
2+
COPY sample-site/html/* /etc/nginx/html/
3+
COPY config/nginx.conf /etc/nginx/nginx.conf
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM sample-site-base:latest
2+
COPY html/* /etc/nginx/html/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx:latest
2+
COPY html/* /etc/nginx/html/
3+
COPY config/nginx.conf /etc/nginx/nginx.conf
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir tmp-context
2+
cp -R ../html tmp-context/
3+
cp -R ../../config tmp-context/
4+
cp Dockerfile-script tmp-context/Dockerfile
5+
docker build -t sample-site:latest tmp-context
6+
rm -rf tmp-context
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Sample Site</title>
6+
</head>
7+
<body>
8+
<h2>Welcome to the first page of the site</h2>
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)