willfarrell / docker-autoheal

Monitor and restart unhealthy docker containers.
MIT License
1.31k stars 225 forks source link

Rework of alpine version tagging for docker images #116

Closed AlexisPPLIN closed 1 year ago

AlexisPPLIN commented 1 year ago

Dockerfile updates

(TODO) Github CI updates

With this update the github ci script could be updated to push multiples tags on every release.

Resolve #114

leleobhz commented 1 year ago

I suggest the change about ${} but I think this is a necessary feature allowing us to keep our lifecycle but also allow user to override on build/compose the alpine version for those who needs different versions/latest.

AlexisPPLIN commented 1 year ago

What do you mean by ? :

I suggest the change about ${}

With this dockerfile update, user can build the image like this :

docker build --build-arg ALPINE_VERSION=latest -t autoheal .
christiantosta commented 1 year ago

What do you mean by ? :

I suggest the change about ${}

It should be:

ARG ALPINE_TAG
FROM alpine:${ALPINE_TAG:-3.18}

So user can pass ALPINE_TAG as build-arg (but whether he do not pass it, docker will use the default: 3.18).

AlexisPPLIN commented 1 year ago

AFAIK :

ARG ALPINE_TAG
FROM alpine:${ALPINE_TAG:-3.18}

Works the same as :

ARG ALPINE_TAG=3.18
FROM alpine:$ALPINE_TAG

As stated by Dockerfile reference : https://docs.docker.com/engine/reference/builder/#default-values