Improve dockerfiles chapter

This commit is contained in:
nemunaire 2025-12-31 12:45:58 +07:00
commit 594f853605
3 changed files with 16 additions and 5 deletions

View file

@ -21,11 +21,22 @@ peut-être déjà le plugin installé. Si vous n'avez pas d'erreur en exécutant
vous pouvez l'installer comme ceci : vous pouvez l'installer comme ceci :
<div lang="en-US"> <div lang="en-US">
```bash
# Pour Ubuntu/Debian
sudo apt-get install docker-buildx-plugin
# Pour Fedora/RHEL
sudo dnf install docker-buildx-plugin
``` ```
V="v0.9.1"
Alternativement, vous pouvez l'installer manuellement depuis GitHub :
```bash
# Récupérer la dernière version depuis GitHub
BUILDX_VERSION=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | grep '"tag_name"' | cut -d'"' -f4)
mkdir -p ~/.docker/cli-plugins mkdir -p ~/.docker/cli-plugins
curl -L -s -S -o ~/.docker/cli-plugins/docker-buildx \ curl -L -s -S -o ~/.docker/cli-plugins/docker-buildx \
https://github.com/docker/buildx/releases/download/$V/buildx-$V.linux-amd64 https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-amd64
chmod +x ~/.docker/cli-plugins/docker-buildx chmod +x ~/.docker/cli-plugins/docker-buildx
``` ```
</div> </div>

View file

@ -15,7 +15,7 @@ des instructions similaires à cela :
<div lang="en-US"> <div lang="en-US">
```dockerfile ```dockerfile
FROM golang:1.18 FROM golang:1
COPY . /go/src/git.nemunai.re/youp0m COPY . /go/src/git.nemunai.re/youp0m
WORKDIR /go/src/git.nemunai.re/youp0m WORKDIR /go/src/git.nemunai.re/youp0m
RUN go build -tags dev -v RUN go build -tags dev -v

View file

@ -201,7 +201,7 @@ COPY docker-entrypoint.d /docker-entrypoint.d
``` ```
</div> </div>
Le dossier sera créé s'il n'existe pas, et le contenu du dossier source ser Le dossier sera créé s'il n'existe pas, et le contenu du dossier source sera
recopié. recopié.
::::: :::::
@ -292,7 +292,7 @@ Par exemple, prenons le `Dockerfile` suivait :
<div lang="en-US"> <div lang="en-US">
```Dockerfile ```Dockerfile
FROM python:3.10 FROM python:3
COPY build /usr/lib/python/grapher COPY build /usr/lib/python/grapher
EXPOSE 8080 EXPOSE 8080
RUN pip install pillow pygal RUN pip install pillow pygal