codeberg-Documentation/.gitignore
Javier Pérez 9a4e3cdc27 Fix the Dockerfile (#630)
# Changelog

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Added

- Ignore the `.pnpm-store` directory generated by the `pnpm` package manager.
- Make the `eleventy` command render changes incrementally when in dev ("serve") mode.

## Changed

- Rename the npm script `serve` to `dev` to improve clarity.
- Update documentation to reflect new npm script name and Dockerfile volume mount point.

## Fixed

- Update the `Dockerfile` to fix errors when building the documentation container.

---

## 1st problem

The current version of the `README.md` tells to run this command:

`docker build -t Codeberg/Documentation-server .`

Unfortunately, it returns this error:

```bash
docker build -t Codeberg/Documentation-server .
[+] Building 0.0s (0/0) docker:default
ERROR: invalid tag "Codeberg/Documentation-server": repository name must be lowercase
```

## 2nd problem

If you try to build an image with the current version of `Dockerfile`, this error occurs:

```bash
[+] Building 2.7s (5/10)                                docker:default
 => [internal] load build definition from Dockerfile              0.0s
 => => transferring dockerfile: 409B                              0.0s
 => [internal] load metadata for docker.io/library/node:16.15.1-  1.1s
 => [internal] load .dockerignore                                 0.0s
 => => transferring context: 2B                                   0.0s
 => CACHED [1/7] FROM docker.io/library/node:16.15.1-stretch-sli  0.0s
 => ERROR [2/7] RUN apt-get update && apt-get -y upgrade          1.4s
------
 > [2/7] RUN apt-get update && apt-get -y upgrade:
0.235 Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
0.278 Ign:2 http://security.debian.org/debian-security stretch/updates Release
0.280 Ign:3 http://deb.debian.org/debian stretch InRelease
0.293 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.308 Ign:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.320 Ign:6 http://deb.debian.org/debian stretch-updates InRelease
0.323 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.339 Ign:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.356 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.363 Ign:7 http://deb.debian.org/debian stretch Release
0.378 Ign:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.408 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.415 Ign:8 http://deb.debian.org/debian stretch-updates Release
0.441 Ign:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.463 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
0.465 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.482 Ign:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.496 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
0.503 Ign:10 http://deb.debian.org/debian stretch/main all Packages
0.511 Err:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
0.511   404  Not Found [IP: 151.101.2.132 80]
0.542 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
0.583 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
0.623 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
0.662 Ign:10 http://deb.debian.org/debian stretch/main all Packages
0.701 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
0.741 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
0.781 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
0.825 Ign:10 http://deb.debian.org/debian stretch/main all Packages
0.872 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
0.912 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
0.953 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
0.994 Ign:10 http://deb.debian.org/debian stretch/main all Packages
1.033 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
1.073 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
1.112 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
1.152 Ign:10 http://deb.debian.org/debian stretch/main all Packages
1.193 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
1.233 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
1.274 Err:9 http://deb.debian.org/debian stretch/main amd64 Packages
1.274   404  Not Found
1.316 Ign:10 http://deb.debian.org/debian stretch/main all Packages
1.357 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
1.397 Err:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
1.397   404  Not Found
1.401 Reading package lists...
1.407 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
1.407 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
1.407 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
1.407 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.2.132 80]
1.407 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
1.407 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
1.407 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
Dockerfile:3
--------------------
   1 |     FROM node:16.15.1-stretch-slim
   2 |
   3 | >>> RUN apt-get update && apt-get -y upgrade
   4 |
   5 |     RUN apt-get install -y git curl
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y upgrade" did not complete successfully: exit code: 100
```

I have fixed both issues and tested building the image and running the container to build the docs site locally.

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/630
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Javier Pérez <walpo@noreply.codeberg.org>
Co-committed-by: Javier Pérez <walpo@noreply.codeberg.org>
2025-11-21 21:40:44 +01:00

25 lines
314 B
Text

# Project-specific
## Output of Eleventy site builder
_site/
.cache/
# Integrated development environments (IDEs) and text editors
## JetBrains
.idea/
## Visual Studio Code
.vscode/
# Package managers
## npm - Node.js
node_modules/
## pnpm - Node.js
.pnpm-store/
# Web servers
## Codeberg Pages
pages.git/