-
Notifications
You must be signed in to change notification settings - Fork 2
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 --xdebug option and xdebug.dockerfile #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM ${DOCKERIZE_BASE_IMAGE} | ||
|
||
# | ||
ENV APP_VERSION="${DOCKERIZE_VERSION}" | ||
|
||
# | ||
ENV DOCKERIZE_VERSION="${DOCKERIZE_VERSION}" | ||
ENV DOCKERIZE_BRANCH="${DOCKERIZE_BRANCH}" | ||
ENV DOCKERIZE_COMMIT="${DOCKERIZE_COMMIT}" | ||
|
||
USER root | ||
|
||
RUN pecl install xdebug-2.9.8 \ | ||
&& docker-php-ext-enable xdebug \ | ||
&& echo "xdebug.remote_host = 10.254.254.254" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Woher kommt die IP-Adresse? Du kannst die DNS There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
&& echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
# Copy all files | ||
COPY --chown=www-data:www-data . /app | ||
|
||
# Pick the right .env file for the container | ||
COPY --chown=www-data:www-data ${DOCKERIZE_ENV} /app/.env | ||
|
||
|
||
RUN true \ | ||
# | ||
# Enable Locale | ||
# | ||
&& sed "s/^#[ \t]*\(${DOCKERIZE_LOCALE}\)/\\1/" -i /etc/locale.gen \ | ||
# | ||
# Install/generate locale | ||
# | ||
&& locale-gen \ | ||
# | ||
# Run composer | ||
# | ||
&& composer --no-dev install \ | ||
# | ||
# Clear cache | ||
# | ||
&& php artisan view:clear \ | ||
# | ||
# Create startup script | ||
# | ||
&& printf "#!/bin/sh\nphp /app/artisan container:startup\n" > /container-startup.sh \ | ||
&& chmod a+x /container-startup.sh | ||
|
||
# Switch back to container user | ||
USER ${DOCKERIZE_CONTAINER_USER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich würde empfehlen Multi-Stage Builds zu verwenden, damit wir kein duplizierten Code haben.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, checke ich