xp-forge / lambda

AWS Lambda for the XP Framework
3 stars 0 forks source link

Pass version along to docker images #4

Closed thekid closed 3 years ago

thekid commented 3 years ago

Implements #1

Usage

# No version passed: Use current locally installed PHP runtime version
$ xp lambda runtime -b
Using PHP 8.0.9

# String "latest" passed: Check https://www.php.net/releases/ for newest version
$ xp lambda runtime:latest -b
Using PHP 8.0.10

# Series with one or two digits passed: Check https://www.php.net/releases/ for newest version in series
$ xp lambda runtime:7.4 -b
Using PHP 7.4.23

# Version passed: Check https://www.php.net/releases/ for version
$ xp lambda runtime:8.0.3 -b
Using PHP 8.0.3

Also works for the xp lambda test command.

Example

image

Docker images

Under the hood, docker images are created as follows:

$  docker image ls lambda-xp-runtime
REPOSITORY          TAG       IMAGE ID       CREATED        SIZE
lambda-xp-runtime   8.0.9     69048a1a43fb   21 hours ago   893MB
lambda-xp-runtime   7.4.23    371e2e4a9929   21 hours ago   852MB
lambda-xp-runtime   8.0.10    2dc28a335bf1   22 hours ago   893MB
lambda-xp-runtime   8.0.3     81899060cbc4   38 hours ago   893MB