Add project files
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
docker search nginx
|
||||
```
|
||||
|
||||
### Offizielle Images mit Doku
|
||||
- [https://hub.docker.com/_/mysql](https://hub.docker.com/_/mysql)
|
||||
- [https://hub.docker.com/_/nginx](https://hub.docker.com/_/nginx)
|
||||
- [https://hub.docker.com/_/node](https://hub.docker.com/_/node)
|
||||
- [https://hub.docker.com/_/php](https://hub.docker.com/_/php)
|
||||
|
||||
### Images und Container
|
||||
- **Image**: Unveränderbare Vorlage
|
||||
```bash
|
||||
@@ -49,15 +55,19 @@
|
||||
```dockerfile
|
||||
FROM php:8.1-fpm
|
||||
WORKDIR /var/www/html
|
||||
COPY composer.json composer.lock ./
|
||||
RUN apt-get update && apt-get install -y \
|
||||
zip \
|
||||
unzip \
|
||||
|
||||
COPY composer.json ./
|
||||
|
||||
RUN apt-get update && apt-get install -y zip unzip \
|
||||
&& docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN composer install --no-scripts --no-autoloader
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN composer dump-autoload --optimize
|
||||
|
||||
EXPOSE 9000
|
||||
CMD ["php-fpm"]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user