Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update php container Dockerfile to point at specific version of composer #1836

Draft
wants to merge 2 commits into
base: legacy
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doenet_docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM composer as composer
# composer:2.2.18
# https://hub.docker.com/layers/library/composer/2.2.18/images/sha256-7b05f8df23459b8631d50c6720025e7f44ab5072c18ec727f64c100ebd03ead4?context=explore
FROM composer@sha256:7b05f8df23459b8631d50c6720025e7f44ab5072c18ec727f64c100ebd03ead4 as composer
WORKDIR /build
COPY ./doenet_docker/php/composer.json .
RUN composer install --ignore-platform-reqs
Expand Down Expand Up @@ -26,4 +28,4 @@ RUN docker-php-ext-install mysqli
WORKDIR /usr/local/apache2/htdocs/api/
COPY ./src/Api .
COPY --from=composer /build/vendor ./vendor
EXPOSE 9000
EXPOSE 9000
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"buildx:mysql": "docker buildx build --platform linux/amd64 -f doenet_docker/mysql/Dockerfile -t lyanthropos/doenet_test:mysql-dev .",
"test": "cypress open",
"test:all": "cypress run -b 'chrome' --config video=false --headless",
"test:app": "cypress run -b 'electron' --config video=false --headless ignoreTestFiles='cypress/e2e/DoenetML/*'",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently this doesn't work, still trying to see if there is a way to do an exclude list rather than an include list with a directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could always change the structure so that the DoenetML specs are in one directory and the rest are in another directory so that you can use a simple --spec with one directory.

Eventually, the plan is to move DoenetML into the DoenetML repository, at which point the specs will be separate anyway.

"publish:db": "docker compose exec -T -w /var/lib/mysql mysql mysqldump -u root -phelloworld --databases --add-drop-database --add-drop-table doenet_local > ./doenet_docker/volumes/db_init/db_template.sql",
"reset:db": "docker compose exec -T mysql mysql -u root -phelloworld doenet_local < ./doenet_docker/volumes/db_init/db_template.sql",
"reset:volumes": "docker volume rm doenet_node_modules doenet_vendor",
Expand Down