├── chapter_1_history
└── README.md
├── chapter_2_dockerfile
├── start.sh
├── .DS_Store
├── web_app
│ └── index.html
└── Dockerfile
├── .DS_Store
└── README.md
/chapter_1_history/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter_2_dockerfile/start.sh:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bambootv/docker_tutorial/HEAD/.DS_Store
--------------------------------------------------------------------------------
/chapter_2_dockerfile/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bambootv/docker_tutorial/HEAD/chapter_2_dockerfile/.DS_Store
--------------------------------------------------------------------------------
/chapter_2_dockerfile/web_app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Docker tutorial
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Docker Tutorial
2 |
3 | This is the application for the [*Docker Tutorial*](https://github.com/HoanKi/docker_tutorial) by [HoanKi](https://github.com/HoanKi).
4 |
5 | + About Dockerfile:
6 | + [Demo](https://github.com/HoanKi/docker_tutorial/tree/dockerfile)
7 |
8 | + About docker-compose:
9 |
10 | + [Rails app with mysql](https://github.com/HoanKi/docker_tutorial/tree/rails_mysql).
11 |
--------------------------------------------------------------------------------
/chapter_2_dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use the official Ubuntu image as the base
2 | FROM ubuntu:latest
3 |
4 | # Configure the main working directory
5 | WORKDIR /app
6 |
7 | # Update package lists and install necessary packages
8 | RUN apt-get update; \
9 | apt-get install -y --no-install-recommends \
10 | nginx \
11 | nano \
12 | vim \
13 | postgresql; \
14 | apt-get clean; \
15 | rm -rf /var/lib/apt/lists/*
16 |
17 | # Copy the startup script and set permissions
18 | COPY start.sh .
19 | RUN chmod +x ./start.sh
20 |
21 | # Set the entrypoint
22 | ENTRYPOINT ["./start.sh"]
23 |
24 | # Expose the required port
25 | EXPOSE 80
26 |
--------------------------------------------------------------------------------