Skip to content

Commit 87a9359

Browse files
author
Bob Killen
committed
initial commit
0 parents  commit 87a9359

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Demo 1 - helloworld
2+
```
3+
docker build -t helloworld demo1-helloworld/
4+
docker run helloworld
5+
```
6+
7+
8+
## Demo 2 - layers
9+
```
10+
docker build -t layers demo2-layers/
11+
docker run layers
12+
docker history layers
13+
```
14+
15+
## Demo 3 - from
16+
```
17+
docker build -t from demo3-from/
18+
docker run from
19+
docker history from
20+
```
21+
22+
## Demo 4 - Run
23+
24+
```
25+
docker pull nginx:stable-alpine
26+
```
27+
28+
**unix/linux**
29+
```
30+
docker run -d -v $(pwd)/demo4-run:/usr/share/nginx/html -p 8888:80 nginx:stable-alpine
31+
```
32+
33+
**windows**
34+
```
35+
docker run -d -v %cd%/demo4-run:/usr/share/nginx/html -p 8888:80 nginx:stable-alpine
36+
```

demo1-helloworld/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM alpine
2+
RUN echo "hello world" > example
3+
CMD ["cat", "example"]

demo2-layers/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM alpine
2+
RUN echo "hello world" > example
3+
CMD [ "echo", "I'm in a container~!"]

demo3-from/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM layers
2+
CMD [ "cat", "example"]

demo4-run/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Welcome to Docker!</title>
5+
<style>
6+
body {
7+
width: 35em;
8+
margin: 0 auto;
9+
font-family: Tahoma, Verdana, Arial, sans-serif;
10+
}
11+
</style>
12+
</head>
13+
<body>
14+
<h1>Welcome to nginx....in a container!</h1>
15+
<p>Simple nginx web server running in a container</p>
16+
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)