From a0f8e3b8c5036c5c1850d677bd805eada88ea534 Mon Sep 17 00:00:00 2001 From: Josh Elster Date: Tue, 20 Mar 2018 09:36:06 -0500 Subject: [PATCH] Add official docker hub images (#18) * update README for build script changes * point build script at docker hub repos. Update images to use public repos * README formatting, modify copy regarding license file * remove commented out lines * add switch to build script for skipping server build * Remove unused parameter, update readme copy with build script changes --- Developer Samples/WindowsContainers/build.ps1 | 20 +++++++++-------- .../inrule-catalog-manager/DOCKERFILE | 2 +- .../inrule-catalog/DOCKERFILE | 5 +---- .../inrule-runtime/DOCKERFILE | 2 +- .../inrule-server/DOCKERFILE | 7 ++---- .../WindowsContainers/inrule-server/readme.md | 4 ---- Developer Samples/WindowsContainers/readme.md | 22 ++++++++++++++----- 7 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Developer Samples/WindowsContainers/build.ps1 b/Developer Samples/WindowsContainers/build.ps1 index 1e2e979..e968b82 100644 --- a/Developer Samples/WindowsContainers/build.ps1 +++ b/Developer Samples/WindowsContainers/build.ps1 @@ -1,8 +1,8 @@ param( [string]$tag, - [string]$registryRootRepos = "server", - [string]$baseBinariesPath = ".", - [switch]$setLatestTag = $false + [string]$registryRootRepos = "inrule", + [switch]$setLatestTag = $false, + [switch]$skipServerBuild = $false ) Push-Location $PSScriptRoot @@ -11,13 +11,15 @@ if ($tag -ne "latest") { $version = $tag } $ErrorActionPreference = "Stop" -write-host "Building inrule-server base image." -set-location "$PSScriptRoot\inrule-server" -docker build --label "com.inrule.version=$version" -t ${registryRootRepos}/inrule-server:$tag . -if ($setLatestTag -eq $true ) { - write-host "Setting image $version to latest..." - docker image tag ${registryRootRepos}/inrule-server:$tag ${registryRootRepos}/inrule-server:latest +if ($skipServerBuild -eq $false) { + write-host "Building inrule-server base image." + set-location "$PSScriptRoot\inrule-server" + docker build --label "com.inrule.version=$version" -t ${registryRootRepos}/inrule-server:$tag . + if ($setLatestTag -eq $true ) { + write-host "Setting image $version to latest..." + docker image tag ${registryRootRepos}/inrule-server:$tag ${registryRootRepos}/inrule-server:latest + } } Write-Host "Building inrule-catalog image." diff --git a/Developer Samples/WindowsContainers/inrule-catalog-manager/DOCKERFILE b/Developer Samples/WindowsContainers/inrule-catalog-manager/DOCKERFILE index a07bdc0..81138af 100644 --- a/Developer Samples/WindowsContainers/inrule-catalog-manager/DOCKERFILE +++ b/Developer Samples/WindowsContainers/inrule-catalog-manager/DOCKERFILE @@ -1,6 +1,6 @@ # escape=` -FROM server/inrule-server:latest +FROM inrule/inrule-server:latest LABEL maintainer="jelster@inrule.com" ` vendor="InRule Technology, Inc." ` diff --git a/Developer Samples/WindowsContainers/inrule-catalog/DOCKERFILE b/Developer Samples/WindowsContainers/inrule-catalog/DOCKERFILE index baba5a0..ea7fc72 100644 --- a/Developer Samples/WindowsContainers/inrule-catalog/DOCKERFILE +++ b/Developer Samples/WindowsContainers/inrule-catalog/DOCKERFILE @@ -1,6 +1,6 @@ # escape=` -FROM server/inrule-server:latest +FROM inrule/inrule-server:latest LABEL maintainer="jelster@inrule.com" ` vendor="InRule Technology, Inc." ` @@ -24,9 +24,6 @@ RUN $acl = Get-Acl -AllCentralAccessPolicies -Path c:\inetpub\wwwroot;(gci $env: RUN Import-Module "WebAdministration";` set-itemproperty -path 'IIS:\Sites\Default Web Site\' -Name physicalPath -Value $env:ContainerDir -#RUN Import-Module "WebAdministration";` -# new-item 'IIS:\Sites\Default Web Site\InRuleCatalogService' -physicalPath C:\InRule\ -type Application -Verbose; - EXPOSE 80:80 EXPOSE 443:443 EXPOSE 1433:1433 diff --git a/Developer Samples/WindowsContainers/inrule-runtime/DOCKERFILE b/Developer Samples/WindowsContainers/inrule-runtime/DOCKERFILE index 20b73bb..d82a1f3 100644 --- a/Developer Samples/WindowsContainers/inrule-runtime/DOCKERFILE +++ b/Developer Samples/WindowsContainers/inrule-runtime/DOCKERFILE @@ -1,6 +1,6 @@ # escape=` -FROM server/inrule-server:latest +FROM inrule/inrule-server:latest LABEL maintainer="jelster@inrule.com" ` vendor="InRule Technology, Inc." ` diff --git a/Developer Samples/WindowsContainers/inrule-server/DOCKERFILE b/Developer Samples/WindowsContainers/inrule-server/DOCKERFILE index e6aafe5..3c4a7a4 100644 --- a/Developer Samples/WindowsContainers/inrule-server/DOCKERFILE +++ b/Developer Samples/WindowsContainers/inrule-server/DOCKERFILE @@ -1,6 +1,6 @@ # escape=` -FROM microsoft/windowsservercore:latest +FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709 LABEL maintainer="jelster@inrule.com" ` vendor="InRule Technology, Inc." ` @@ -11,7 +11,4 @@ SHELL ["powershell", "-Command"] ADD . c:\temp\ WORKDIR c:\temp\ RUN .\InRuleServerDSC.ps1 -Wait; -RUN New-EventLog -LogName InRule -Source "InRule.Repository","InRule.Repository.Service","InRule.Runtime","InRule.Runtime.Service","InRule.Authoring.irAuthor","InRule.Admin.CatalogManager" - -# REMARK: Temporary workaround for Windows DNS client weirdness -#RUN powershell set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord \ No newline at end of file +RUN New-EventLog -LogName InRule -Source "InRule.Repository","InRule.Repository.Service","InRule.Runtime","InRule.Runtime.Service","InRule.Authoring.irAuthor","InRule.Admin.CatalogManager" \ No newline at end of file diff --git a/Developer Samples/WindowsContainers/inrule-server/readme.md b/Developer Samples/WindowsContainers/inrule-server/readme.md index 64a9eb2..4de73cb 100644 --- a/Developer Samples/WindowsContainers/inrule-server/readme.md +++ b/Developer Samples/WindowsContainers/inrule-server/readme.md @@ -1,7 +1,3 @@ -# InRule Samples - -## Sample Title - # README for the inrule-server DOCKER image ## Notes regarding licensing diff --git a/Developer Samples/WindowsContainers/readme.md b/Developer Samples/WindowsContainers/readme.md index 22745ea..91bcf8b 100644 --- a/Developer Samples/WindowsContainers/readme.md +++ b/Developer Samples/WindowsContainers/readme.md @@ -1,8 +1,6 @@ # InRule Samples -## Sample Title - -# InRule Docker images +## InRule Docker images ## Image descriptions @@ -14,15 +12,21 @@ * Catalog management is provided by [inrule-catalog-manager](inrule-catalog-manager/). RuleApplications can be viewed, labeled, and promoted. Users can be created and modified along with permissions. -* Catalog database persistence is provided by SQL Server Express and comes from [microsoft/mssql-server-windows-express](https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/windows-containers/mssql-server-2016-express-sp1-windows) +* Although most flavors of SQL are supported (SQL Server, MySQL, Oracle, etc.) irCatalog database persistence is provided by SQL Server Express and comes from [microsoft/mssql-server-windows-express](https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/windows-containers/mssql-server-2016-express-sp1-windows) ### Image repository and registry -Images can be built using the respective dockerfiles in this repository. Because the images produced embed the InRule License key into them, you should refrain from making images publically available. +Images can be built using the respective dockerfiles in this repository. Take care to protect your license key file by avoiding pushing images containing a license key file to public repositories ### Building the images -To build all of the sample images using the included build script, first clone the repository into a working directory. Next, run the [build.ps1](/build.ps1) script in an elevated Powershell prompt, passing in the name of the tag you'd like to use: +Here are the steps to building these images from their base assets. To build the sample images using the included build script: + +1. Clone the repository into a working directory + +2. Copy into the repository's respective directories the contents of the related irServer directory. Always copy the *lowest* directory level. For example, for the `inrule-catalog` image, copy the assets installed by default to `%Program Files (x86)%\InRule\irServer\RepositoryService\IisService\` into the `\inrule-catalog\irCatalog` folder. Repeat the process for the other two service components (inrule-runtime and inrule-catalog-manager). + +3. Run the [build.ps1](/build.ps1) script in an elevated Powershell prompt at the root of this repository, passing in the name of the tag you'd like to use: `.\build.ps1 -tag '5.0.24'` @@ -30,6 +34,12 @@ If you want to also have the images tagged as 'latest', pass `-SetLatestTag` to `.\build.ps1 -tag '5.0.24' -setLatestTag` +To skip building the `inrule-server` base image, pass the `skipServerBuild` switch to the build script. + + Please see the instructions for each respective image for information on how to build the individual images.