Integrating Docker into an Existing Project

This page describes how you can convert an existing non-docker based project into a docker based one. If you want to install Spryker Commerce OS in Docker from scratch, start from here.

Prerequisites

To start Docker integration into your project, overview and install the necessary features:

Name Feature Required sub-feature
Spryker Core 201907.0

Feature

Set up .dockerignore

Create a new .dockerignorefile to match the project file structure.

.git
.idea
node_modules
/vendor
/data
!/data/import
.git*
.unison*
/.nvmrc
/.scrutinizer.yml
/.travis.yml
/newrelic.ini
 
/docker
!/docker/deployment/

Set up Configuration

Under config/Shared, adjust or create a configuration file which depends on the environment name.

As the Docker configuration file is too big, find a ready-made working example here. Also, the configuration has to be adjusted for specific store(s), e.g config_default-docker_DE.php.

Set up Deploy File

Deploy file is a YAML file defining Spryker infrastructure and services for Spryker tools used to deploy Spryker applications in different environments.

It's possible to create an unlimited amount of deployment files with different configuration settings, e.g deploy.yml for demo mode or deploy.dev.yml for development mode.

Find an example of deploy file for demo mode (DE, AT, and US stores) below:

Find an example of deploy file for development mode (DE, AT, and US stores) below:

Set up Installation Script

Under config/Shared, prepare the installation recipe that defines the way Spryker should be installed.

Find an installation recipe example below:

Start Developing

Follow the guide to start working with Docker.


See also:

Last review date: Aug 06, 2019