diff --git a/Makefile b/Makefile index ef5d754..ea9348b 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,8 @@ all: alpine test-alpine php test-php .PHONY: deploy deploy: alpine php -.PHONY: alpine alpine313 alpine314 alpine315 alpine316 alpine318 alpineedge -alpine: alpine318 alpineedge +.PHONY: alpine alpine313 alpine314 alpine315 alpine316 alpine318 alpine319 alpineedge +alpine: alpine318 alpine319 alpineedge alpine313: docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:3.13 alpine/3.13 @@ -41,7 +41,10 @@ alpine316: docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:3.16 alpine/3.16 alpine318: - docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:3.18 -t $(REGISTRY)williarin/alpine:latest alpine/3.18 + docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:3.18 alpine/3.18 + +alpine319: + docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:3.19 -t $(REGISTRY)williarin/alpine:latest alpine/3.19 alpineedge: docker $(BUILDX) build $(PUSH) --no-cache $(PLATFORM) -t $(REGISTRY)williarin/alpine:edge alpine/edge @@ -69,6 +72,10 @@ test-alpine318: docker run --rm $(REGISTRY)williarin/alpine:3.18 /bin/sh -c "zsh --version | grep -e '^zsh [0-9]\.[0-9]'" docker run --rm $(REGISTRY)williarin/alpine:3.18 /bin/sh -c "cat /etc/os-release | grep -e 'Alpine Linux v3.18'" +test-alpine319: + docker run --rm $(REGISTRY)williarin/alpine:3.19 /bin/sh -c "zsh --version | grep -e '^zsh [0-9]\.[0-9]'" + docker run --rm $(REGISTRY)williarin/alpine:3.19 /bin/sh -c "cat /etc/os-release | grep -e 'Alpine Linux v3.19'" + test-alpineedge: docker run --rm $(REGISTRY)williarin/alpine:edge /bin/sh -c "zsh --version | grep -e '^zsh [0-9]\.[0-9]'" docker run --rm $(REGISTRY)williarin/alpine:edge /bin/sh -c "cat /etc/os-release | grep -e 'Alpine Linux edge'" diff --git a/README.md b/README.md index 095c9f6..bfa6482 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,14 @@ docker run --rm -it -u '1000:1000' williarin/alpine | ------ | ---- | | williarin/alpine:edge | [![](https://img.shields.io/docker/image-size/williarin/alpine/edge)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:latest | [![](https://img.shields.io/docker/image-size/williarin/alpine/latest)](https://hub.docker.com/r/williarin/alpine) | +| williarin/alpine:3.19 | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.19)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:3.18 | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.18)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:3.16 [deprecated] | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.16)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:3.15 [deprecated] | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.15)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:3.14 [deprecated] | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.14)](https://hub.docker.com/r/williarin/alpine) | | williarin/alpine:3.13 [deprecated] | [![](https://img.shields.io/docker/image-size/williarin/alpine/3.13)](https://hub.docker.com/r/williarin/alpine) | -_**Note:** `latest` is equivalent to `3.18`_ +_**Note:** `latest` is equivalent to `3.19`_ ## PHP 7.4, 8.0, 8.1, 8.2, 8.3 images @@ -56,7 +57,7 @@ Images are built once a week at 00:00 on Monday. ### Details -All PHP images are based on Alpine Linux 3.18 ([williarin/alpine](#alpine-linux-with-zsh)). They come with `bash`, `zsh`, `zip`, `unzip` and widely used PHP extensions. +All PHP images are based on Alpine Linux 3.19 ([williarin/alpine](#alpine-linux-with-zsh)). They come with `bash`, `zsh`, `zip`, `unzip` and widely used PHP extensions. Installed PHP extensions: diff --git a/alpine/3.19/Dockerfile b/alpine/3.19/Dockerfile new file mode 100644 index 0000000..e3cfa7f --- /dev/null +++ b/alpine/3.19/Dockerfile @@ -0,0 +1,27 @@ +FROM alpine:3.19 + +RUN set -eux; \ + apk update; \ + apk add icu-data-full exa tzdata git zsh-vcs zsh zsh-autosuggestions zsh-syntax-highlighting; \ + cat "/usr/share/zoneinfo/UTC" > /etc/localtime + +COPY docker/ /ohmyzsh/ + +RUN set -eux; \ + wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh; \ + ZSH=/ohmyzsh/.oh-my-zsh sh install.sh --unattended --keep-zshrc; \ + rm ./install.sh; \ + git clone https://github.com/spaceship-prompt/spaceship-prompt.git "/ohmyzsh/.oh-my-zsh/themes/spaceship-prompt" --depth=1; \ + ln -s "/ohmyzsh/.oh-my-zsh/themes/spaceship-prompt/spaceship.zsh-theme" "/ohmyzsh/.oh-my-zsh/themes/spaceship.zsh-theme" + +RUN addgroup -S 1000; \ + adduser -D -S -u 1000 -G 1000 -h /home/dockeruser -s /bin/sh dockeruser; + +RUN apk del git tzdata \ + && chmod +x /ohmyzsh/docker-entrypoint \ + && cp /ohmyzsh/zsh/.[^.]* /root/ \ + && mv /ohmyzsh/zsh/.[^.]* /home/dockeruser/ \ + && chown -R 1000:1000 /home/dockeruser/ \ + && rm -rf /var/cache/apk/* + +CMD [ "/ohmyzsh/docker-entrypoint" ] diff --git a/alpine/3.19/docker/docker-entrypoint b/alpine/3.19/docker/docker-entrypoint new file mode 100755 index 0000000..5781a77 --- /dev/null +++ b/alpine/3.19/docker/docker-entrypoint @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ -t 1 ]; then + exec zsh +fi diff --git a/alpine/3.19/docker/zsh/.aliases.zsh b/alpine/3.19/docker/zsh/.aliases.zsh new file mode 100644 index 0000000..2d734bd --- /dev/null +++ b/alpine/3.19/docker/zsh/.aliases.zsh @@ -0,0 +1,4 @@ +alias ls="exa --icons --group-directories-first" +alias l="exa -aaghl --git --icons --group-directories-first" +alias ll="exa -ghl --git --icons --group-directories-first" +alias lt="exa --tree --level=2 --icons --group-directories-first" diff --git a/alpine/3.19/docker/zsh/.zshrc b/alpine/3.19/docker/zsh/.zshrc new file mode 100644 index 0000000..9cd5af5 --- /dev/null +++ b/alpine/3.19/docker/zsh/.zshrc @@ -0,0 +1,10 @@ +export ZSH="/ohmyzsh/.oh-my-zsh" + +ZSH_THEME="spaceship" +ZSH_DISABLE_COMPFIX=true + +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source $ZSH/oh-my-zsh.sh + +[ -f ~/.aliases.zsh ] && source ~/.aliases.zsh diff --git a/php/8.0/docker/scripts/install-packages.sh b/php/8.0/docker/scripts/install-packages.sh index 7f160ac..7111a6d 100755 --- a/php/8.0/docker/scripts/install-packages.sh +++ b/php/8.0/docker/scripts/install-packages.sh @@ -7,7 +7,10 @@ apk --no-cache add \ apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main add 'icu-libs==71.1-r2'; -apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/community add \ +apk --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/community \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main \ + add \ php8 \ php8-ctype \ php8-curl \ diff --git a/php/8.1/docker/scripts/install-packages.sh b/php/8.1/docker/scripts/install-packages.sh index 85becc6..28067e3 100755 --- a/php/8.1/docker/scripts/install-packages.sh +++ b/php/8.1/docker/scripts/install-packages.sh @@ -1,7 +1,10 @@ #!/bin/sh set -ex -apk --no-cache add \ +apk --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/community \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/main \ + add \ bash \ zip unzip \ icu-libs \ diff --git a/php/8.2/docker/scripts/install-packages.sh b/php/8.2/docker/scripts/install-packages.sh index d3d33a1..e27e5d0 100755 --- a/php/8.2/docker/scripts/install-packages.sh +++ b/php/8.2/docker/scripts/install-packages.sh @@ -1,7 +1,10 @@ #!/bin/sh set -ex -apk --no-cache add \ +apk --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.19/community \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.19/main \ + add \ bash \ zip unzip \ icu-libs \ @@ -36,5 +39,3 @@ apk --no-cache add \ php82-fileinfo \ php82-sodium \ php82-opcache - -ln -s /usr/bin/php82 /usr/bin/php diff --git a/php/8.3/docker/scripts/install-packages.sh b/php/8.3/docker/scripts/install-packages.sh index 0027723..c83fc84 100755 --- a/php/8.3/docker/scripts/install-packages.sh +++ b/php/8.3/docker/scripts/install-packages.sh @@ -7,7 +7,10 @@ apk --no-cache add \ apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main add libavif icu-libs libsodium -apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community add \ +apk --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ + --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \ + add \ php83 \ php83-ctype \ php83-curl \ @@ -39,4 +42,5 @@ apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community php83-sodium \ php83-opcache +rm -f /usr/bin/php ln -s /usr/bin/php83 /usr/bin/php