Closed apolopena closed 2 years ago
I once wanted to test a PHP8 workspace. For this I changed the PHP version in the starter.ini to "version=gitpodlatest".
Then I started a GitPod workspace, unfortunately again a cached image was used for the workspace and PHP 7.4 was active in it.
I first had to change the .gitpod.Dockerfile and increment the value "INVALIDATE_CACHE".
Is this desired to be able to change only the PHP version via this way?
Then came this error, PHP 8 does not build correctly.
[4/9] RUN sudo bash -c ". /tmp/php.sh" && rm /tmp/php.sh:
8 9.602 Hit:7 https://download.docker.com/linux/ubuntu focal InRelease
8 10.03 Get:8 https://pkgs.tailscale.com/stable/ubuntu focal InRelease
error: failed to solve: process "/bin/sh -c sudo bash -c \". /tmp/php.sh\" && rm /tmp/php.sh" did not complete successfully: exit code: 1 {"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","command":"build","error":"exit status 1","level":"error","message":"build failed","serviceContext":{"service":"bob","version":""},"severity":"ERROR","time":"2022-01-22T21:35:16Z"} exit exit
Error: headless task failed: exit status 1
I also saw that in the install_xdebug the PHP version is determined dynamically, but then this line is found there to build xdebug.
Error by PHP8 is this here:
/tmp/php.sh: line 123: generate_php_fpm_conf: command not found
in regard to cached values in starter.ini
Is this desired to be able to change only the PHP version via this way?
Any code/values that are used in the docker build image step has to be invalidated when they change or it gets cached so I dont think there is any other way to handle this. All values that dont require a docker cache buster (invalidate_cache) when they are changed should be documented as such in starter.ini
. See the comment header in starter.ini.
Note: When a user creates a new project for the first time the docker cache will be busted so they can change thier values in starter.ini
before they create their very first workspace from that project and they wont have to bust the docker cache.
As for the hardcoded values for xdebug and gitpodlatest
fallbaback I will look into those today or tomorrow.
Problem this feature will solve
See https://github.com/apolopena/gitpod-laravel-starter/issues/156#issuecomment-1018883245
Background
Proposed Solution
See https://github.com/apolopena/gitpod-laravel-starter/issues/156#issuecomment-1018883245
Constraints and Assumptions
<! -- Any constraints and/or assumption relevant for the development and use of this feature? -->
Alternatives or Workarounds
Additional context
Add any other context or screenshots about the feature request here.