This container contains everything necessary to run Jekyll3 for working with Magento DevDocs.
Reads the Dockerfile
and creates an image tagged as jekyll3.
docker build -t jekyll3 .
- Navigate to your local devdocs repository folder.
- If you are running the container for the first time, delete the file
Gemfile.lock
if it exists. - Run the following command to create a docker container named 'devdocs' that generates and serves the DevDocs HTML:
docker run --rm --name devdocs -p 4000:4000 -v $PWD:/src jekyll3 jekyll serve --host 0.0.0.0 --incremental
When the command exits, the container will be deleted.
For linux users, you can access the generated HTML site from localhost
on port 4000.
For Mac and Windows users, you must get the ip of the virtual machine running docker.
Run the following command to get the ip of the docker machine and use it to access the generated HTML site on port 4000.
docker-machine ip default
You can shorten build times by ignoring entire version directories.
- Navigate to your local devdocs repository folder.
- Create a file called
._config.yml
with the following content:
#exclude: ['scss', 'bin', 'node_modules', 'vendor', '.git', '.idea', 'guides/v2.0', 'guides/v2.1']
#exclude: ['scss', 'bin', 'node_modules', 'vendor', '.git', '.idea', 'guides/v2.2', 'guides/v2.1']
#exclude: ['scss', 'bin', 'node_modules', 'vendor', '.git', '.idea', 'guides/v2.0', 'guides/v2.2']
#exclude: ['scss', 'bin', 'node_modules', 'vendor', '.git', '.idea']
#exclude: ['scss', 'bin', 'node_modules', 'vendor', '.git', '.idea', 'guides/v2.0', 'guides/v2.2','guides/v2.1']
- Uncomment the line that excludes the versions you do not need built.
- Run the following command in the devdocs repository folder:
docker run --rm --name devdocs -p 4000:4000 -v $PWD:/src jekyll3 jekyll serve --host 0.0.0.0 --config _config.yml,._config.yml --incremental