Commit Graph

101 Commits

Author SHA1 Message Date
Liam Crilly 20a5fd44ac Docker: add support for JavaScript modules. 2023-05-09 19:19:36 +01:00
Konstantin Pavlov 86a701abe0 Docker: made curl fail with non-zero exit code on server errors. 2023-04-12 16:00:32 -07:00
Konstantin Pavlov bfd9a0a30a Docker: fixed a typo. 2023-04-11 15:39:42 -07:00
Konstantin Pavlov 028e537bef Docker: fixed git references. 2023-03-28 14:45:10 -07:00
Konstantin Pavlov 5d83ee6660 Docker: drop apt-get clean usage.
It's automatic in the Debian and Ubuntu containers: https://github.com/debuerreotype/debuerreotype/blob/5cf7949ecf1cec1afece267688bda64cd34a6817/scripts/debuerreotype-minimizing-config#L85-L109
2023-04-06 20:43:22 -07:00
Konstantin Pavlov 472c6d0fb0 Docker: explicitely set uid/gid to 999 for unit user.
This allows us to be consistent through possible updates of default
settings used in distributions.  Previous behaviour was uid/gid were
chosen automatically based on what uids/gids are already taken on the
system.
2023-04-06 20:43:22 -07:00
Konstantin Pavlov 6d51672d8d Packages: use groupadd/useradd on Debian-based operating systems.
addgroup/adduser will no longer be installed by default in the
"minbase".  Also, moving to lower-level utilities saves us one runtime
dependency.
2023-04-06 20:43:22 -07:00
Konstantin Pavlov 886aa17e79 Docker: added OCI image-spec labels. 2023-04-06 20:43:22 -07:00
Konstantin Pavlov 09cd3793aa Docker: specified explicit variants of images to use.
This allows us to decide when to move to a newer underlying distribution
version with our pace instead of relying on Docker Hub cadence.
2023-04-06 20:43:22 -07:00
Konstantin Pavlov 6ed5f1654e Docker: dropped a leftover from a multi-stage build. 2023-04-06 20:43:22 -07:00
Konstantin Pavlov 8392f8c902 Docker: check out packaging tags.
This will ensure we're checking out source code that is close to what we
have in binary packages.

While at it, remove the checkout directory when it's no longer needed.
2023-04-10 15:36:48 -07:00
Konstantin Pavlov 31424f409e Docker: added njs support. 2023-03-30 16:17:59 -07:00
Alejandro Colomar 6e16d7ac5b Auto: mirroring installation structure in build tree.
This makes the build tree more organized, which is good for adding new
stuff.  Now, it's useful for example for adding manual pages in man3/,
but it may be useful in the future for example for extending the build
system to run linters (e.g., clang-tidy(1), Clang analyzer, ...) on the
C source code.

Previously, the build tree was quite flat, and looked like this (after
`./configure && make`):

    $ tree -I src build
    build
    ├── Makefile
    ├── autoconf.data
    ├── autoconf.err
    ├── echo
    ├── libnxt.a
    ├── nxt_auto_config.h
    ├── nxt_version.h
    ├── unitd
    └── unitd.8

    1 directory, 9 files

And after this patch, it looks like this:

    $ tree -I src build
    build
    ├── Makefile
    ├── autoconf.data
    ├── autoconf.err
    ├── bin
    │   └── echo
    ├── include
    │   ├── nxt_auto_config.h
    │   └── nxt_version.h
    ├── lib
    │   ├── libnxt.a
    │   └── unit
    │       └── modules
    ├── sbin
    │   └── unitd
    ├── share
    │   └── man
    │       └── man8
    │           └── unitd.8
    └── var
        ├── lib
        │   └── unit
        ├── log
        │   └── unit
        └── run
            └── unit

    17 directories, 9 files

It also solves one issue introduced in
5a37171f73 ("Added default values for pathnames.").  Before that
commit, it was possible to run unitd from the build system
(`./build/unitd`).  Now, since it expects files in a very specific
location, that has been broken.  By having a directory structure that
mirrors the installation, it's possible to trick it to believe it's
installed, and run it from there:

    $ ./configure --prefix=./build
    $ make
    $ ./build/sbin/unitd

Fixes: 5a37171f73 ("Added default values for pathnames.")
Reported-by: Liam Crilly <liam@nginx.com>
Reviewed-by: Konstantin Pavlov <thresh@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Cc: Andrei Zeliankou <zelenkov@nginx.com>
Cc: Zhidao Hong <z.hong@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2023-03-29 00:41:08 +02:00
Alejandro Colomar 5ba79b9b52 Renamed --libstatedir to --statedir.
In BSD systems, it's usually </var/db> or some other dir under </var>
that is not </var/lib>, so $statedir is a more generic name.  See
hier(7).

Reported-by: Andrei Zeliankou <zelenkov@nginx.com>
Reported-by: Zhidao Hong <z.hong@f5.com>
Reviewed-by: Konstantin Pavlov <thresh@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Cc: Liam Crilly <liam@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2023-03-29 00:40:40 +02:00
Konstantin Pavlov 565dcbb139 Docker: bumped language versions. 2023-02-13 17:04:24 -08:00
Konstantin Pavlov 2a597c5c7a Docker: limited the waiting time for control socket creation.
While at it, fixed a typo.
2023-02-13 17:04:24 -08:00
Konstantin Pavlov 054518bb36 Docker: made dockerfiles use a single stage build process. 2023-02-13 17:04:24 -08:00
Konstantin Pavlov eb47174875 Docker: added a target to generate Docker library definition. 2023-02-13 17:04:24 -08:00
Konstantin Pavlov a8f21079e0 Docker: cleanup unused targets. 2023-02-13 17:04:24 -08:00
Andrei Zeliankou 814815a3c5 Merged with the 1.29 branch. 2023-03-01 18:25:52 +00:00
Andrei Zeliankou 0af1253c17 Generated Dockerfiles for Unit 1.29.1. 2023-02-28 14:52:32 +00:00
Konstantin Pavlov b0bb829107 Packages: get rid of deprecated configure options. 2023-02-06 12:39:06 -08:00
Andrei Zeliankou 87a1a9c0d2 Generated Dockerfiles for Unit 1.29.0. 2022-12-15 12:42:01 +00:00
Konstantin Pavlov 63cc4a31bd Docker: limited the waiting time for control socket removal.
Fixes https://github.com/nginx/unit/issues/728
Refs https://github.com/nginx/unit/issues/718
2022-12-13 13:36:39 -08:00
Konstantin Pavlov f09d0e2284 Regenerated Dockerfiles. 2022-12-13 11:50:42 -08:00
Konstantin Pavlov 9f6d7c7ccd Docker: bumped language versions. 2022-12-07 18:31:48 -08:00
Alejandro Colomar a3cb07df20 Fixed path for sed(1).
Some distros provide it in /bin/sed and others in both /bin/sed
and /usr/bin/sed.  Use the more available one.

Reported-by: Konstantin Pavlov <thresh@nginx.com>
Fixes: ac64ffde57 "Improved readability of <docker-entrypoint.sh>."
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2022-10-27 14:30:49 +02:00
javad mnjd ac64ffde57 Improved readability of <docker-entrypoint.sh>.
Cc: Konstantin Pavlov <thresh@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2022-10-26 16:32:15 +02:00
Andrei Zeliankou 38bd7e76a1 Generated Dockerfiles for Unit 1.28.0. 2022-09-13 07:26:26 +08:00
Konstantin Pavlov 4924bd185d Regenerated Dockerfiles. 2022-09-09 17:45:58 +04:00
Konstantin Pavlov 38350c17fc Docker: bumped language versions, moved jsc11 to eclipse-temurin.
openjdk builds are no longer provided in the docker library due to deprecation.
2022-09-09 16:17:42 +04:00
Andrei Zeliankou 3d1fa29f1d Generated Dockerfiles for Unit 1.27.0. 2022-06-02 12:31:55 +00:00
Konstantin Pavlov 1fe389c2e2 Regenerated Dockerfiles. 2022-05-11 13:06:17 +04:00
Konstantin Pavlov 967fa8f78a Docker: bumped language versions. 2022-05-11 12:59:39 +04:00
Konstantin Pavlov 485886d8f9 Docker: bumped Python image version. 2022-01-13 11:35:12 +03:00
Konstantin Pavlov 6507849282 Docker: bumped PHP image version. 2021-12-17 17:15:55 +03:00
Konstantin Pavlov 3e0ece20b5 Docker: made Dockerfiles architecture agnostic. 2021-12-01 18:34:20 +03:00
Valentin Bartenev 8b954d8331 Generated Dockerfiles for Unit 1.26.1. 2021-12-02 18:23:00 +03:00
Konstantin Pavlov 380f2dc2ba Docker: respect the binary from CMD in the entrypoint. 2021-11-30 17:00:47 +03:00
Valentin Bartenev 3f9d587269 Generated Dockerfiles for Unit 1.26.0. 2021-11-18 15:48:02 +03:00
Konstantin Pavlov 2fc64c65bc Regenerated Dockerfiles. 2021-09-21 14:03:54 +03:00
Konstantin Pavlov d51b3bbfeb Docker: bumped versions.
Minimal image now uses Debian 11 "Bullseye" as a base.

Language versions are bumped to:
- Go 1.17
- Node 16
- Perl 5.34
- Ruby 3.0
2021-09-21 14:03:23 +03:00
Valentin Bartenev 66e986fc19 Generated Dockerfiles for Unit 1.25.0. 2021-08-19 17:52:54 +03:00
Valentin Bartenev 25d8e102b0 Generated Dockerfiles for Unit 1.24.0. 2021-05-27 16:07:15 +03:00
Valentin Bartenev 71d3700951 Generated Dockerfiles for Unit 1.23.0. 2021-03-25 17:15:30 +03:00
Konstantin Pavlov 958bc90caa Regenerated Dockerfiles. 2021-02-05 15:54:51 +03:00
Konstantin Pavlov 6dbb36a537 Docker: added curl run-time dependency.
It is needed for docker-entrypoint scripts to work.
2021-02-05 14:48:52 +03:00
Valentin Bartenev 98228f8ac8 Generated Dockerfiles for Unit 1.22.0. 2021-02-04 18:22:33 +03:00
Konstantin Pavlov d4d704bc7f Docker: reverted 44154b830401.
Automatic synchronisation is now set up, so manual pushes to AWS ECR are
discouraged.
2021-02-02 16:46:10 +03:00
Konstantin Pavlov 510bdf15be Regenerated Dockerfiles. 2021-02-01 18:05:12 +03:00