Fix invalid markdown language warnings

pull/3904/head
Kamran Ahmed 1 year ago
parent 7a8d97b1cd
commit 6fcb153244
  1. 2
      src/components/PageSponsor.tsx
  2. 4
      src/data/roadmaps/docker/content/105-using-third-party-images/index.md
  3. 4
      src/data/roadmaps/docker/content/106-building-container-images/101-efficient-layer-caching.md
  4. 14
      src/data/roadmaps/docker/content/106-building-container-images/102-image-size-and-security.md
  5. 4
      src/data/roadmaps/docker/content/106-building-container-images/index.md
  6. 4
      src/data/roadmaps/docker/content/109-container-security/100-image-security.md
  7. 4
      src/data/roadmaps/docker/content/110-docker-cli/index.md
  8. 4
      src/data/roadmaps/postgresql-dba/content/111-troubleshooting-techniques/104-profiling-tools/100-gdb.md

@ -54,7 +54,7 @@ export function PageSponsor(props: PageSponsorProps) {
};
useEffect(() => {
window.setTimeout(loadSponsor, 500);
window.setTimeout(loadSponsor);
}, []);
if ($isSponsorHidden || !sponsor) {

@ -12,7 +12,7 @@ For example: If you're looking for a `Node.js` image, you can search for "node"
To use a third-party image in your Dockerfile, simply set the image name as the base image using the `FROM` directive. Here's an example using the official Node.js image:
```Dockerfile
```dockerfile
FROM node:14
# The rest of your Dockerfile...
@ -24,4 +24,4 @@ Keep in mind that third-party images can potentially have security vulnerabiliti
## Maintaining Your Images
When using third-party images, it's essential to keep them updated to incorporate the latest security updates and dependency changes. Regularly check for updates in your base images and rebuild your application containers accordingly.
When using third-party images, it's essential to keep them updated to incorporate the latest security updates and dependency changes. Regularly check for updates in your base images and rebuild your application containers accordingly.

@ -8,7 +8,7 @@ Docker creates a new layer for each instruction (e.g., `RUN`, `COPY`, `ADD`, etc
For example, consider the following Dockerfile:
```Dockerfile
```dockerfile
FROM node:14
WORKDIR /app
@ -37,4 +37,4 @@ When you build the image for the first time, Docker will execute each instructio
By following these best practices, you can optimize the layer caching process and reduce the build time for your Docker images, making your development and deployment processes more efficient.
- [Docker Layer Caching](https://docs.docker.com/build/cache/).
- [Docker Layer Caching](https://docs.docker.com/build/cache/).

@ -6,20 +6,20 @@ When building container images, it's essential to be aware of both image size an
- **Use an appropriate base image:** Choose a smaller, more lightweight base image that includes only the necessary components for your application. For example, consider using the `alpine` variant of an official image, if available, as it's typically much smaller in size.
```Dockerfile
```dockerfile
FROM node:14-alpine
```
- **Run multiple commands in a single `RUN` statement:** Each `RUN` statement creates a new layer in the image, which contributes to the image size. Combine multiple commands into a single `RUN` statement using `&&` to minimize the number of layers and reduce the final image size.
```Dockerfile
```dockerfile
RUN apt-get update && \
apt-get install -y some-required-package
```
- **Remove unnecessary files in the same layer:** When you install packages or add files during the image build process, remove temporary or unused files in the same layer to reduce the final image size.
```Dockerfile
```dockerfile
RUN apt-get update && \
apt-get install -y some-required-package && \
apt-get clean && \
@ -28,7 +28,7 @@ When building container images, it's essential to be aware of both image size an
- **Use multi-stage builds:** Use multi-stage builds to create smaller images. Multi-stage builds allow you to use multiple `FROM` statements in your Dockerfile. Each `FROM` statement creates a new stage in the build process. You can copy files from one stage to another using the `COPY --from` statement.
```Dockerfile
```dockerfile
FROM node:14-alpine AS build
WORKDIR /app
COPY package*.json ./
@ -57,7 +57,7 @@ When building container images, it's essential to be aware of both image size an
- **Avoid running containers as root:** Always use a non-root user when running your containers to minimize potential risks. Create a user and switch to it before running your application.
```Dockerfile
```dockerfile
RUN addgroup -g 1000 appuser && \
adduser -u 1000 -G appuser -D appuser
USER appuser
@ -65,11 +65,11 @@ When building container images, it's essential to be aware of both image size an
- **Limit the scope of `COPY` or `ADD` instructions:** Be specific about the files or directories you're copying into the container image. Avoid using `COPY . .` as it may unintentionally include sensitive files.
```Dockerfile
```dockerfile
COPY package*.json ./
COPY src/ src/
```
- **Scan images for vulnerabilities:** Use tools like [Anchore](https://anchore.com/) or [Clair](https://github.com/quay/clair) to scan your images for vulnerabilities and fix them before deployment.
By following these best practices, you'll be able to build more efficient and secure container images, leading to improved performance and a reduced risk of vulnerabilities in your applications.
By following these best practices, you'll be able to build more efficient and secure container images, leading to improved performance and a reduced risk of vulnerabilities in your applications.

@ -6,7 +6,7 @@ Container images are executable packages that include everything required to run
The key component in building a container image is the `Dockerfile`. It is essentially a script containing instructions on how to assemble a Docker image. Each instruction in the Dockerfile creates a new layer in the image, making it easier to track changes and minimize the image size. Here's a simple example of a Dockerfile:
```Dockerfile
```dockerfile
# Use an official Python runtime as a parent image
FROM python:3.7-slim
@ -86,4 +86,4 @@ Finally, push the tagged image to the registry:
docker push username/repository:tag
```
Building container images is a crucial aspect of using Docker, as it enables you to package and deploy your applications with ease. By creating a Dockerfile with precise instructions, you can effortlessly build and distribute images across various platforms.
Building container images is a crucial aspect of using Docker, as it enables you to package and deploy your applications with ease. By creating a Dockerfile with precise instructions, you can effortlessly build and distribute images across various platforms.

@ -48,7 +48,7 @@ Multi-stage builds allow you to use multiple `FROM` instructions within the same
Here's an example Dockerfile using multi-stage builds:
```Dockerfile
```dockerfile
# Build stage
FROM node:12-alpine AS build
WORKDIR /app
@ -61,4 +61,4 @@ COPY --from=build /app /app
CMD ["npm", "start"]
```
By following these best practices for image security, you can minimize the risk of vulnerabilities and ensure the safety of your containerized applications.
By following these best practices for image security, you can minimize the risk of vulnerabilities and ensure the safety of your containerized applications.

@ -39,7 +39,7 @@ A Dockerfile is a script containing instructions to build a Docker image. You ca
Here is a simple example of a Dockerfile:
```Dockerfile
```dockerfile
# Set the base image to use
FROM alpine:3.7
@ -87,4 +87,4 @@ Run the application using the command:
docker-compose up
```
In conclusion, the Docker CLI is a robust and versatile tool for managing all aspects of Docker containers and resources. Once familiar with its commands and capabilities, you'll be well-equipped to develop, maintain and deploy applications using Docker with ease.
In conclusion, the Docker CLI is a robust and versatile tool for managing all aspects of Docker containers and resources. Once familiar with its commands and capabilities, you'll be well-equipped to develop, maintain and deploy applications using Docker with ease.

@ -22,7 +22,7 @@ To use GDB with PostgreSQL, follow these steps:
```
- Set breakpoints based on function names or source code file names and line numbers.
```gdb
```
break function_name
break filename:linenumber
```
@ -38,4 +38,4 @@ To use GDB with PostgreSQL, follow these steps:
Keep in mind that using GDB with a production PostgreSQL environment is not recommended due to the potential risk of freezing or crashing the server. Always use GDB on a test or development environment.
For more information on how to use GDB and its commands, refer to the [official GDB documentation](https://sourceware.org/gdb/current/onlinedocs/gdb/).
For more information on how to use GDB and its commands, refer to the [official GDB documentation](https://sourceware.org/gdb/current/onlinedocs/gdb/).

Loading…
Cancel
Save