Skip to content

Commit

Permalink
Merge pull request #664 from spryker-sdk/feature/frw-8801/added-spryk…
Browse files Browse the repository at this point in the history
…erci-83-docker-image

FRW-8801 Added sprykerci-83 docker image.
  • Loading branch information
olhalivitchuk authored Sep 25, 2024
2 parents 4dfd4b0 + 7e430b4 commit 1858a31
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.0",
"php": ">=8.1",
"ext-ctype": "*",
"ext-curl": "*",
"ext-iconv": "*",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 82 additions & 0 deletions infrastructure/sdk.sprykerci-8.3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
ARG SPRYKER_PARENT_IMAGE=spryker/php:8.3

FROM ${SPRYKER_PARENT_IMAGE} AS application-production-dependencies

USER root

RUN apk update \
&& apk add --no-cache \
curl \
git \
graphviz \
nodejs \
npm \
rsync \
libxslt-dev \
&& npm install -g [email protected]

RUN docker-php-ext-install xsl

RUN git config --add --system safe.directory /project

########################################
# New Relic Extension
# It's already in the core image.
########################################

COPY infrastructure/newrelic/newrelic.ini /usr/local/etc/php/conf.d/90-newrelic.ini

ARG SPRYKER_COMPOSER_MODE

FROM application-production-dependencies AS application-production-codebase

RUN chown spryker:spryker ${srcRoot}

USER spryker
# Authorize SSH Host
RUN mkdir -p /home/spryker/.ssh && \
chmod 0700 /home/spryker/.ssh && \
ssh-keyscan github.com > /home/spryker/.ssh/known_hosts

COPY --chown=spryker:spryker phpstan-bootstrap.php ${srcRoot}/phpstan-bootstrap.php
COPY --chown=spryker:spryker assets ${srcRoot}/assets
COPY --chown=spryker:spryker src ${srcRoot}/src
COPY --chown=spryker:spryker app ${srcRoot}/app
COPY --chown=spryker:spryker db ${srcRoot}/db
COPY --chown=spryker:spryker extension ${srcRoot}/extension
COPY --chown=spryker:spryker config ${srcRoot}/config
COPY --chown=spryker:spryker frontend ${srcRoot}/frontend
COPY --chown=spryker:spryker bin ${srcRoot}/bin
COPY --chown=spryker:spryker .env ${srcRoot}/.env
COPY --chown=spryker:spryker .env.prod ${srcRoot}/.env.prod
COPY --chown=spryker:spryker .env.sprykerci ${srcRoot}/.env.sprykerci
COPY --chown=spryker:spryker composer.json composer.lock package.json package-lock.json bootstrap.php phpstan-bootstrap.php ${srcRoot}/

COPY --chown=spryker:spryker infrastructure/newrelic/entrypoint.sh ${srcRoot}/entrypoint.sh
RUN chmod +x ${srcRoot}/entrypoint.sh

WORKDIR ${srcRoot}

ENV APP_ENV=sprykerci
ENV NRIA_ENABLE_PROCESS_METRICS=true

RUN npm install

RUN composer update \
spryker/architecture-sniffer \
laminas/laminas-config \
laminas/laminas-servicemanager \
laminas/laminas-stdlib \
laminas/laminas-filter \
laminas/laminas-code \
--no-scripts --no-interaction

RUN composer install --no-scripts --no-interaction --optimize-autoloader -vvv --no-dev

RUN composer dump-env sprykerci

RUN bin/console sdk:init:sdk -n

RUN bin/console cache:clear --no-debug

ENTRYPOINT ["/data/entrypoint.sh"]

0 comments on commit 1858a31

Please sign in to comment.