Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions lesson_5_build/Dockerfile.ex1
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM

LABEL
ENV
EXPOSE

ADD
COPY
RUN

FROM nginx:1.22.1

LABEL author=CMSN
ENV LESSON_NUMBER=5
EXPOSE 80

RUN mv /etc/nginx/nginx.conf /etc/nginx/default.conf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

por que fas isto? para gardar o orixinal?

COPY ex1.conf /etc/nginx/nginx.conf
COPY ex1_web.html /var/www/index.html
9 changes: 8 additions & 1 deletion lesson_5_build/ex1_solution.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
### Port 80 content
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

#### Port 8888 content
Thank you for using nginx.

#### Port 8888 content
Docker course lesson 5
3 changes: 3 additions & 0 deletions lesson_5_build/ex2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ Edit the Dockerfile and/or write below your thoughts. Open a pull request with y

### Your changes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poderîas ter engadido máis cousas:

  • cambiar a imaxe a lago máis minimalista (p.e. alpine), incluso unha imaxe que corra o binario e punto
  • Facer un multistage para librarte do lixo que xera APT
  • APT sen cache
  • Borrar o zip


- Combine lines 4 and 5
- Replace line 8 with **ADD hello.zip**
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diría que COPY e ADD ocupan o mesmo, non? eu diría de facer o unzip fora, aforras operaciónes e capas

- Remove line 10