openresty / docker-openresty

Docker tooling for OpenResty
https://hub.docker.com/r/openresty/openresty
BSD 2-Clause "Simplified" License
937 stars 525 forks source link

Image Labels incorrect not updated in new releases #179

Closed otzoran closed 3 years ago

otzoran commented 3 years ago

hi Evan,

The Issue

Recreate

Just downloaded openresty/openresty:1.19.3.1-6-buster-fat

This is the image repo:

$ docker image ls 
REPOSITORY                                            TAG                     IMAGE ID       CREATED        SIZE
local/openresty                                       buster-fat-latest       9807fd733a2c   4 weeks ago    136MB
openresty/openresty                                   <none>                  9807fd733a2c   4 weeks ago    136MB
local/openresty                                       buster-fat              58aab71df228   2 months ago   136MB
openresty/openresty                                   1.19.3.1-3-buster-fat   58aab71df228   2 months ago   136MB

Here's what I get when inspecting the labels for the recent 1.19.3.1-6-buster-fat:

$ img=9807fd733a2c
$ docker inspect $img | jq '.[0].Config.Labels'
{
  "maintainer": "Evan Wies <evan@neomantra.net>",
  "resty_deb_flavor": "",
  "resty_deb_version": "=1.19.3.1-1~buster1",
  "resty_image_base": "debian",
  "resty_image_tag": "buster-slim"
}

Here's what I get when inspecting the labels for the older 1.19.3.1-3-buster-fat:

$ img=58aab71df228
$ docker inspect $img | jq '.[0].Config.Labels'
{
  "maintainer": "Evan Wies <evan@neomantra.net>",
  "resty_deb_flavor": "",
  "resty_deb_version": "=1.19.3.1-1~buster1",
  "resty_image_base": "debian",
  "resty_image_tag": "buster-slim"
}

thanx Ori

neomantra commented 3 years ago

Hello,

The tag on the image refers to the docker-openresty Git tag. This is tracked on the CHANGELOG.md.

The resty_deb_version corresponds to the versions available here. I don't think there are any newer?

For the resty_image_tag on buster-fat, I think you are right and I need to re-apply the label in the Dockerfile. However, I think the change I'm going to make is to change the label there to RESTY_FAT_IMAGE_BASE and RESTY_FAT_IMAGE_TAG so that both levels of labels are maintained. Thoughts on that?

otzoran commented 3 years ago

thanx for the express reply and clarifications.

The tag on the image ...

I see, but image tags can be easily changed. There should be an immutable label engraved in the image that expressly identify the docker-openrestyso that it can be distinguished from the resty_deb_version

The resty_deb_version corresponds

ok, now it's clear. The README is not verbose in this respect. The link you provided may be great.

For the resty_image_tag ...

Fine. As long as I can distinguish slim and fat ...

neomantra commented 3 years ago

I just pushed 1.19.3.1-8 with changes that add documentation and preserve labels better.

docker inspect openresty/openresty:1.19.3.1-8-alpine-fat | jq '.[0].Config.Labels'
{
  "maintainer": "Evan Wies <evan@neomantra.net>",
  "resty_add_package_builddeps": "",
  "resty_add_package_rundeps": "",
  "resty_config_deps": "--with-pcre     --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl/include'     --with-ld-opt='-L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl/lib -Wl,-rpath,/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib'     ",
  "resty_config_options": "    --with-compat     --with-file-aio     --with-http_addition_module     --with-http_auth_request_module     --with-http_dav_module     --with-http_flv_module     --with-http_geoip_module=dynamic     --with-http_gunzip_module     --with-http_gzip_static_module     --with-http_image_filter_module=dynamic     --with-http_mp4_module     --with-http_random_index_module     --with-http_realip_module     --with-http_secure_link_module     --with-http_slice_module     --with-http_ssl_module     --with-http_stub_status_module     --with-http_sub_module     --with-http_v2_module     --with-http_xslt_module=dynamic     --with-ipv6     --with-mail     --with-mail_ssl_module     --with-md5-asm     --with-pcre-jit     --with-sha1-asm     --with-stream     --with-stream_ssl_module     --with-threads     ",
  "resty_config_options_more": "",
  "resty_eval_post_make": "",
  "resty_eval_pre_configure": "",
  "resty_fat_image_base": "openresty/openresty",
  "resty_fat_image_tag": "alpine",
  "resty_image_base": "alpine",
  "resty_image_tag": "3.13",
  "resty_luarocks_version": "3.7.0",
  "resty_openssl_patch_version": "1.1.1f",
  "resty_openssl_url_base": "https://www.openssl.org/source",
  "resty_openssl_version": "1.1.1k",
  "resty_pcre_version": "8.44",
  "resty_version": "1.19.3.1"
}