Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
Website
Commits
eb36eb4b
Commit
eb36eb4b
authored
4 years ago
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
switch to new docker container
parent
b72c073c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+9
-32
9 additions, 32 deletions
Dockerfile
with
9 additions
and
32 deletions
Dockerfile
+
9
−
32
View file @
eb36eb4b
...
...
@@ -8,47 +8,24 @@ RUN yarn install
RUN
yarn compile
# Prepare Webserver
ARG
INSTALL_CRON=0
ARG
INSTALL_COMPOSER=0
ARG
PHP_VERSION
ARG
GLOBAL_VERSION
FROM
thecodingmachine/php:8.0-v4-slim-apache
FROM
php:8-apache-buster
# |--------------------------------------------------------------------------
# |
Main PHP
extensions
# |
install php
extensions
# |--------------------------------------------------------------------------
# |
# | Installs the main PHP extensions
# |
USER
root
RUN
cd
/usr/local/lib/thecodingmachine-php/extensions/current/
&&
./install_all.sh
&&
./disable_all.sh
USER
docker
RUN
docker-php-ext-install mysqli
# |--------------------------------------------------------------------------
# |
Default PHP extensions to be enabled (in addition to the one declared in Slim build)
# |
enable production php ini
# |--------------------------------------------------------------------------
ENV
PHP_EXTENSION_APCU=0 \
PHP_EXTENSION_MYSQLI=1 \
PHP_EXTENSION_PDO_MYSQL=0 \
PHP_EXTENSION_IGBINARY=0 \
PHP_EXTENSION_REDIS=0 \
PHP_EXTENSION_SOAP=0
RUN
mv
"
$PHP_INI_DIR
/php.ini-production"
"
$PHP_INI_DIR
/php.ini"
# |--------------------------------------------------------------------------
# |
Enabl
e
p
ro
duction config files
# |
copy websit
e
f
ro
m node build
# |--------------------------------------------------------------------------
ENV
APP_ENV=prod \
TEMPLATE_PHP_INI=production \
PHP_INI_ERROR_REPORTING=0
COPY
--from=build /build/public /var/www/html
# |--------------------------------------------------------------------------
# | Run Apache as www-data for more security
# |--------------------------------------------------------------------------
ENV
APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data \
APACHE_EXTENSIONS=headers
# |--------------------------------------------------------------------------
# | Add php files of website
# | expose http port
# |--------------------------------------------------------------------------
COPY
--from=build /build/public /var/www/html
\ No newline at end of file
EXPOSE
80
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment