Skip to content

Instantly share code, notes, and snippets.

@erikaheidi
Created July 1, 2022 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikaheidi/c75d3525e8dac8f5cc0c557f57ae0cef to your computer and use it in GitHub Desktop.
Save erikaheidi/c75d3525e8dac8f5cc0c557f57ae0cef to your computer and use it in GitHub Desktop.
PHP 8.1 Apko base image
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
packages:
- alpine-baselayout
- php81
- php81-common
- php81-curl
entrypoint:
command: /usr/bin/php81
environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin
accounts:
groups:
- groupname: php
gid: 10000
users:
- username: php
uid: 10000
run-as: php
paths:
- path: /home/php
type: directory
uid: 10000
gid: 10000
permissions: 0o755
@erikaheidi
Copy link
Author

Running a Minicli app with an ephemeral container:

docker run --rm --volume $PWD:/home/php php-cli:8.1 /home/php/minicli help

@erikaheidi
Copy link
Author

Building the image with Apko

apko build php-cli-81.yaml php-cli:8.1 php-cli-81.tar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment