Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgine/symfony-golden-image
Docker image based on official php, composer and alpine docker images. This image contains symfony framework with all its required extensions.
https://github.com/devgine/symfony-golden-image
alpine alpine-linux composer devops docker dockerfile multi-environment php symfony symfony-cli
Last synced: 3 days ago
JSON representation
Docker image based on official php, composer and alpine docker images. This image contains symfony framework with all its required extensions.
- Host: GitHub
- URL: https://github.com/devgine/symfony-golden-image
- Owner: devgine
- License: mit
- Created: 2023-04-17T11:05:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-01T23:32:03.000Z (about 1 month ago)
- Last Synced: 2024-12-01T23:32:21.143Z (about 1 month ago)
- Topics: alpine, alpine-linux, composer, devops, docker, dockerfile, multi-environment, php, symfony, symfony-cli
- Language: Dockerfile
- Homepage: https://github.com/devgine/symfony-golden-image/pkgs/container/symfony-golden/versions
- Size: 116 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Symfony docker image
[![Build](https://github.com/devgine/symfony-golden-image/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/devgine/symfony-golden-image/actions/workflows/build.yaml)
![GitHub top language](https://img.shields.io/github/languages/top/devgine/symfony-golden-image)
[![Packages retention policy](https://github.com/devgine/symfony-golden-image/actions/workflows/packages-retention-policy.yaml/badge.svg?branch=main)](https://github.com/devgine/symfony-golden-image/actions/workflows/packages-retention-policy.yaml)![cover.png](.readme/images/cover.png)
## About
This repository is a docker image based on official php, composer and alpine docker images.
This image contains symfony framework installed with all its required extensions.
It's useful to easily set symfony project up## Image details
### Available versions
Below is the list of all the available images by Symfony and PHP versions:
SF Version
PHP Version
Docker image tag
7.2
8.4
ghcr.io/devgine/symfony-golden:latest
ghcr.io/devgine/symfony-golden:v7.2-php8.4-alpine
8.3
ghcr.io/devgine/symfony-golden:v7.2-php8.3-alpine
8.2
ghcr.io/devgine/symfony-golden:v7.2-php8.2-alpine
7.1
8.4
ghcr.io/devgine/symfony-golden:v7.1-php8.4-alpine
8.3
ghcr.io/devgine/symfony-golden:v7.1-php8.3-alpine
8.2
ghcr.io/devgine/symfony-golden:v7.1-php8.2-alpine
7.0
8.4
ghcr.io/devgine/symfony-golden:v7.0-php8.4-alpine
8.3
ghcr.io/devgine/symfony-golden:v7.0-php8.3-alpine
8.2
ghcr.io/devgine/symfony-golden:v7.0-php8.2-alpine
6.4
8.4
ghcr.io/devgine/symfony-golden:v6.4-php8.4-alpine
8.3
ghcr.io/devgine/symfony-golden:v6.4-php8.3-alpine
8.2
ghcr.io/devgine/symfony-golden:v6.4-php8.2-alpine
8.1
ghcr.io/devgine/symfony-golden:v6.4-php8.1-alpine
### Environment variables
| Variable | Default | Description |
|-------------------|---------|---------------------------------------------------------|
| SG_SERVER_ENABLED | true | Status of symfony server (to be disabled in production) |## Usage
### Install from the command line
```shell
docker run -d -p 8000:8000 -v HOST_DIRECTORY:/var/www/symfony ghcr.io/devgine/symfony-golden:latest
```
> You can change latest by a specific tag
> [Available versions](https://github.com/devgine/symfony-golden-image/pkgs/container/symfony-golden/versions)After the built-in, server will be started.
Visit http://localhost:8000 in your web browser.**Connect to the container**
```shell
docker exec -ti CONTAINER_ID sh
```### Use as base image in Dockerfile
```dockerfile
FROM ghcr.io/devgine/symfony-golden:latest# Add your custom instructions here
# example: install mongodb driver
RUN set -xe \
&& apk add --no-cache --update --virtual .phpize-deps $PHPIZE_DEPS openssl curl-dev openssl-dev \
&& pecl install mongodb
#...
```### Use with docker compose
```yaml
# localhost:8000
services:
symfony:
image: ghcr.io/devgine/symfony-golden:latest
volumes:
- HOST_DIRECTORY:/var/www/symfony
ports:
- 8000:8000
```**Access :** http://localhost:8000
### Use with nginx
First of all, configure nginx as recommended by symfony communityhttps://symfony.com/doc/current/setup/web_server_configuration.html#nginx
```yaml
# compose.yaml
services:
nginx:
image: nginx:latest
volumes:
- HOST_DIRECTORY/public:/var/www/symfony/public
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80symfony:
image: ghcr.io/devgine/symfony-golden:latest
environment:
SG_SERVER_ENABLED: false # do not run symfony server
volumes:
- HOST_DIRECTORY:/var/www/symfony
```**Access :** http://localhost
## References
* [Symfony releases](https://symfony.com/releases)
* [PHP releases](https://www.php.net/supported-versions.php)