Skip to content

Docker image based on official php, composer and alpine docker images. This image contains symfony framework with all its required extensions.

License

Notifications You must be signed in to change notification settings

devgine/symfony-golden-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony docker image

Build GitHub top language Packages retention policy

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.
Below is the list of all the available images by Symfony and PHP versions:

SF Version PHP Version Docker image tag
7.0 8.3 ghcr.io/devgine/symfony-golden:latest
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.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
6.3 8.3 ghcr.io/devgine/symfony-golden:v6.3-php8.3-alpine
8.2 ghcr.io/devgine/symfony-golden:v6.3-php8.2-alpine
8.1 ghcr.io/devgine/symfony-golden:v6.3-php8.1-alpine
6.2 8.3 ghcr.io/devgine/symfony-golden:v6.2-php8.3-alpine
8.2 ghcr.io/devgine/symfony-golden:v6.2-php8.2-alpine
8.1 ghcr.io/devgine/symfony-golden:v6.2-php8.1-alpine
6.1 8.3 ghcr.io/devgine/symfony-golden:v6.1-php8.3-alpine
8.2 ghcr.io/devgine/symfony-golden:v6.1-php8.2-alpine
8.1 ghcr.io/devgine/symfony-golden:v6.1-php8.1-alpine
5.4 8.3 ghcr.io/devgine/symfony-golden:v5.4-php8.3-alpine
8.2 ghcr.io/devgine/symfony-golden:v5.4-php8.2-alpine
8.1 ghcr.io/devgine/symfony-golden:v5.4-php8.1-alpine
8.0 ghcr.io/devgine/symfony-golden:v5.4-php8.0-alpine
7.4 ghcr.io/devgine/symfony-golden:v5.4-php7.4-alpine
7.3 ghcr.io/devgine/symfony-golden:v5.4-php7.3-alpine
7.2 ghcr.io/devgine/symfony-golden:v5.4-php7.2-alpine

Usage

Install from the command line

docker run --rm -ti -p 8000:8000 ghcr.io/devgine/symfony-golden:latest sh

You can change latest by a specific tag
Available versions

After the built-in, server will be started.
Visit http://localhost:8000 in your web browser.

Use as base image in 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

services:
  symfony:
    image: ghcr.io/devgine/symfony-golden:latest
    ports:
      - 8000:8000

Be careful, if you bind the symfony project as a volume, it will be erased by the local directory.
To fix that, after your service running you can launch the below command inside the container.

new-symfony $DIRECTORY
# example
new-symfony /var/www

References