Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sitecore/docker-tools
Sitecore Docker Tools are utilities which assist Sitecore developers in initializing and running containerized Sitecore environments.
https://github.com/sitecore/docker-tools
Last synced: about 1 month ago
JSON representation
Sitecore Docker Tools are utilities which assist Sitecore developers in initializing and running containerized Sitecore environments.
- Host: GitHub
- URL: https://github.com/sitecore/docker-tools
- Owner: Sitecore
- License: mit
- Created: 2020-12-17T23:45:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-08T14:42:26.000Z (about 1 year ago)
- Last Synced: 2024-04-14T22:17:59.285Z (8 months ago)
- Language: PowerShell
- Size: 193 KB
- Stars: 26
- Watchers: 7
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Sitecore - Sitecore Docker Tools - Set of utilities to improve developer experience when running Sitecore in a Docker environment. This an image with development scripts and entrypoints that can be used during Sitecore container builds and a PowerShell module with functions used on the Sitecore container host to initialize the Sitecore Docker environment. (Containers)
README
# Sitecore Docker Tools
Sitecore Docker Tools are utilities which improve developer experience when running Sitecore in a Docker environment. This includes:
* `sitecore-docker-tools-assets`, a Docker image with development scripts and entrypoints which can be used during Sitecore container builds.
[![Image Build Status](https://dev.azure.com/sitecore-devex/docker-tools/_apis/build/status/DockerTools.Image?branchName=main)](https://dev.azure.com/sitecore-devex/docker-tools/_build/latest?definitionId=9&branchName=main)
* `SitecoreDockerTools`, a PowerShell module with functions used on the Sitecore container host to initialize the Sitecore Docker environment.
[![PowrShell Build Status](https://dev.azure.com/sitecore-devex/docker-tools/_apis/build/status/DockerTools.PowerShell?branchName=main)](https://dev.azure.com/sitecore-devex/docker-tools/_build/latest?definitionId=10&branchName=main)## Usage
Released versions of these utilities can be found on the Sitecore Container Registry and the Sitecore PowerShell Gallery. Usage details can be found in the [Sitecore container development documentation](https://doc.sitecore.com/developers/100/developer-tools/en/containers-in-sitecore-development.html).
### Docker Image
The scripts found in the Docker image are intended to be copied in via your custom `Dockerfile`.```Dockerfile
FROM ${TOOLS_IMAGE} as tools
FROM ${PARENT_IMAGE}
COPY --from=tools C:\tools C:\tools
```You can enable the [development entrypoint](https://doc.sitecore.com/developers/100/developer-tools/en/deploying-files-into-running-containers.html#idp15256) in your `docker-compose` override.
```yml
entrypoint: powershell.exe -Command "& C:\tools\entrypoints\iis\Development.ps1"
```The development entrypoint also enables the application of development-specific configuration patches and configuration transforms at runtime via the `SITECORE_DEVELOPMENT_PATCHES` environment variable. You can see [available patches here](image/src/dev-patches).
```yml
environment:
SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff
```### PowerShell Module
The PowerShell module can be installed and imported from the Sitecore PowerShell Gallery.```powershell
Register-PSRepository -Name SitecoreGallery -SourceLocation https://nuget.sitecore.com/resources/v2/
Install-Module SitecoreDockerTools
Import-Module SitecoreDockerTools# See available commands
Get-Command -Module SitecoreDockerTools
```## Building/Using from Source
### Docker Image
```powershell
cd image\src
docker-compose build
```### PowerShell Module
```powershell
Import-Module .\powershell\src\SitecoreDockerTools.psd1
```## Running Tests
Unit tests require use of [Pester v4](https://pester.dev/docs/v4/introduction/installation).
From the root folder of either project:
```powershell
Import-Module Pester -RequiredVersion 4.9.0
Invoke-Pester -Path .\test\*
```