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

add php and phpunit to dev container #2101

Open
wants to merge 1 commit into
base: legacy
Choose a base branch
from
Open
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
25 changes: 21 additions & 4 deletions doenet_docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM node:19.8-bullseye
FROM composer as composer
WORKDIR /build
COPY ./doenet_docker/dev/composer.json .
RUN composer install --ignore-platform-reqs

FROM node:19.8-bullseye
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >/etc/apt/sources.list.d/bullseye-backports.list

RUN apt-get update && \
apt-get -y install \
gnome-keyring \
Expand All @@ -12,8 +15,15 @@ RUN apt-get update && \
gnupg \
lsb-release \
#update git to support ssh signing
git/bullseye-backports

git/bullseye-backports \
# for php
php-common \
libapache2-mod-php \
php-cli \
php-xml \
php-mbstring

# prep Docker
WORKDIR /
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Expand All @@ -28,7 +38,14 @@ RUN rm -rf /var/lib/apt/lists/* &&\
apt-get -y autoremove && \
apt-get clean

# prep workspace
RUN mkdir -p /home/node/workspace/node_modules && chown -R node:node /home/node/workspace

# php composer deps
WORKDIR /usr/local/apache2/htdocs/api/
COPY --from=composer /build/vendor ./vendor

# local configs
WORKDIR /home/node/workspace
COPY --chown=node:node package*.json vite.config.js ./
USER node
Expand Down
6 changes: 6 additions & 0 deletions doenet_docker/dev/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require": {
"firebase/php-jwt": "5.2.*",
"phpunit/phpunit": "9.6.7"
}
}