Fix invalid markdown language warnings

pull/3904/head
Kamran Ahmed 1 year ago
parent 7a8d97b1cd
commit 6fcb153244
  1. 2
      src/components/PageSponsor.tsx
  2. 2
      src/data/roadmaps/docker/content/105-using-third-party-images/index.md
  3. 2
      src/data/roadmaps/docker/content/106-building-container-images/101-efficient-layer-caching.md
  4. 12
      src/data/roadmaps/docker/content/106-building-container-images/102-image-size-and-security.md
  5. 2
      src/data/roadmaps/docker/content/106-building-container-images/index.md
  6. 2
      src/data/roadmaps/docker/content/109-container-security/100-image-security.md
  7. 2
      src/data/roadmaps/docker/content/110-docker-cli/index.md
  8. 2
      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...

@ -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

@ -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,7 +65,7 @@ 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/
```

@ -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

@ -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

@ -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

@ -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
```

Loading…
Cancel
Save