# Dockerfile là gì?

## Dockerfile là gì?

* Dockerfile là một tệp văn bản chứa một loạt lệnh hoặc hướng dẫn.
* Các hướng dẫn này được thực hiện theo thứ tự chúng được viết.
* Việc thực hiện các hướng dẫn này diễn ra trên một hình ảnh cơ sở.
* Khi xây dựng Dockerfile, các hành động liên tiếp sẽ tạo thành một hình ảnh mới từ hình ảnh gốc cơ sở.

#### Chúng ta sẽ xem qua từng hướng dẫn trong Dockerfile và xem nó được sử dụng như thế nào.

* [Lab #1: Installing GIT](https://dockerlabs.collabnix.com/beginners/dockerfile/lab1_dockerfile_git.html)
* [Lab #2: ADD instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab-2-Create-an-image-with-ADD-instruction.html)
* [Lab #3: COPY instruction](https://dockerlabs.collabnix.com//beginners/dockerfile/lab4_dockerfile_copy.html)
* [Lab #4: CMD instruction](https://dockerlabs.collabnix.com//beginners/dockerfile/lab4_cmd.html)
* [Lab #5: ENTRYPOINT instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Dockerfile-ENTRYPOINT.html)
* [Lab #6: WORKDIR instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/WORKDIR_instruction.html)
* [Lab #7: RUN instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab-7-Create-an-image-with-EXPOSE-instruction.html)
* [Lab #8: ARG instruction](https://dockerlabs.collabnix.com//beginners/dockerfile/arg.html)
* [Lab #9: EXPOSE instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab-7-Create-an-image-with-EXPOSE-instruction.html)
* [Lab #10: VOLUME instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab%2310_VOLUME_instruction.html)
* [Lab #11: EXPOSE instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab%2311_EXPOSE_instruction.html)
* [Lab #12: LABEL instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Label_instruction.html)
* [Lab #13: ONBUILD instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/onbuild.html)
* [Lab #14: HEALTHCHECK instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/healthcheck.html)
* [Lab #15: SHELL instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/Lab-14-Create-an-image-with-SHELL-instruction.html)
* [Lab #16: Entrypoint Vs RUN](https://dockerlabs.collabnix.com/beginners/dockerfile/entrypoint-vs-run.html)
* [Lab #17: USER instruction](https://dockerlabs.collabnix.com/beginners/dockerfile/user.html)
* [Writing Dockerfile with Hello Python Script Added](https://dockerlabs.collabnix.com/beginners/dockerfile/lab_dockerfile_python.html)

#### Hãy tiếp tục:

* [Lab #1: Create an image with GIT installed](https://dockerlabs.collabnix.com/beginners/dockerfile/lab1_dockerfile_git.html)

{% code title="Tài liệu tham khảo" overflow="wrap" lineNumbers="true" %}

```
https://dockerlabs.collabnix.com/beginners/dockerfile/Writing-dockerfile.html
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blogs.nhquydev.net/devsecops/docker/dockerfile/dockerfile-la-gi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
