Sign inSign up

sensson/magento1

By sensson

Updated over 8 years ago

A base Magento 1.9 image that can be used to scale in production.

Image
0

743

sensson/magento1 repository overview

docker-magento1

Docker Automated Build Docker Build Status

A base Magento 1.9 image that can be used to scale in production. This can be used in combination with MySQL and Redis. It is opiniated and includes support for Composer, ionCube, Redis, OPcache, and the required PHP modules for a basic Magento installation.

It does not include Magento.

Usage

An example Dockerfile

FROM sensson/magento1
COPY src/ /var/www/html/

Persistent storage

The container assumes you do not store data in a folder along with the application. Don't use Docker volumes for scale. Use CephFS, GlusterFS or integrate with S3 or S3-compatible services such as Fuga.io.

Configuration

local.xml

Once the container starts it will always change app/etc/local.xml to the credentials that were specified as environment variable. You should never have to save your credentials in git. Stay safe.

You can leave some settings empty such as your encryption key:

<crypt>
    <key></key>
</crypt>

and your database details:

<resources>
    <db>
        <table_prefix></table_prefix>
    </db>
    <default_setup>
        <connection>
            <host></host>
            <username></username>
            <password></password>
            <dbname></dbname>
            <active>1</active>
        </connection>
    </default_setup>
</resources>

Do not remove the settings completely and always leave local.xml in place. Once the container starts it will automatically populate all required fields.

Environment variables

Environment variableDescriptionDefault
MYSQL_HOSTNAMEMySQL hostnamemysql
MYSQL_USERNAMEMySQL usernameroot
MYSQL_PASSWORDMySQL passwordrandom
MYSQL_DATABASEMySQL databasemagento
TABLE_PREFIXTable prefixEmpty
CRYPTO_KEYMagento Encryption keyEmtpy
URIUri (e.g. http://localhost)http://localhost
RUNTYPESet to development to enableEmpty

Include the port mapping in URI if you run your shop on a local development environment, e.g. http://localhost:3000/.

Development mode

Setting RUNTYPE to development will turn on public error reports. Anything else will leave it off. It will also set display_errors to on in PHP. This is set to off by default.

Tag summary

Content type

Image

Digest

Size

195.3 MB

Last updated

over 8 years ago

docker pull sensson/magento1