I’m building a PHP and deploying it using Capistrano. It works all fine on version 1, but upgrading to version 2 I have a few problems.
The docker container doesn’t have ruby installed, when I try to install it I get a permission denied error (even with sudo)
The machine executor doesn’t have php installed
Do I have to manually install php, ruby and everything else I need in the machine?
I would prefer to use the docker container if there is a way to install php in there.
Hey Feliciano, I’ve had a look through my git history but I can’t seem to find the commit where I tried to install ruby in the docker image. Here’s what my config looked like before I decided to use version 1:
version: 2
jobs:
build:
docker:
- image: circleci/php:7.1
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: php composer.phar install --no-interaction --prefer-dist --optimize-autoloader
- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- run: vendor/bin/phpunit --coverage-text=build/text/coverage.txt --log-junit=build/junit/junit.xml
- store_test_results:
path: build/junit
Either way, I’ve got it working in version 1 now, and I know that I’ve just got to build my own docker image that I can user for version 2, so you can probably close this ticket out.