Skip to content

Commit

Permalink
Add official docker hub images (#18)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jelster authored Mar 20, 2018
1 parent 652f5a6 commit a0f8e3b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 30 deletions.
20 changes: 11 additions & 9 deletions Developer Samples/WindowsContainers/build.ps1
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# escape=`

FROM server/inrule-server:latest
FROM inrule/inrule-server:latest

LABEL maintainer="[email protected]" `
vendor="InRule Technology, Inc." `
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# escape=`

FROM server/inrule-server:latest
FROM inrule/inrule-server:latest

LABEL maintainer="[email protected]" `
vendor="InRule Technology, Inc." `
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# escape=`

FROM server/inrule-server:latest
FROM inrule/inrule-server:latest

LABEL maintainer="[email protected]" `
vendor="InRule Technology, Inc." `
Expand Down
7 changes: 2 additions & 5 deletions Developer Samples/WindowsContainers/inrule-server/DOCKERFILE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# escape=`

FROM microsoft/windowsservercore:latest
FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709

LABEL maintainer="[email protected]" `
vendor="InRule Technology, Inc." `
Expand All @@ -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
RUN New-EventLog -LogName InRule -Source "InRule.Repository","InRule.Repository.Service","InRule.Runtime","InRule.Runtime.Service","InRule.Authoring.irAuthor","InRule.Admin.CatalogManager"
4 changes: 0 additions & 4 deletions Developer Samples/WindowsContainers/inrule-server/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# InRule Samples

## Sample Title

# README for the inrule-server DOCKER image

## Notes regarding licensing
Expand Down
22 changes: 16 additions & 6 deletions Developer Samples/WindowsContainers/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# InRule Samples

## Sample Title

# InRule Docker images
## InRule Docker images

## Image descriptions

Expand All @@ -14,22 +12,34 @@

* 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'`

If you want to also have the images tagged as 'latest', pass `-SetLatestTag` to the script:

`.\build.ps1 -tag '5.0.24' -setLatestTag`

To skip building the `inrule-server` base image, pass the `skipServerBuild` switch to the build script.

<!-- Unless otherwise specified, InRule assets (e.g., irCatalog, irServer components) will be copied into their respective directories by the build script. The default installation location of `C:\Program Files (x86)\InRule\irServer` is used for this, but can be overridden by providing a value for the `defaultInRuleInstallFolder` parameter:
`.\build.ps1 -tag '5.0.26 -defaultInRuleInstallFolder 'z:\inrule\'`
-->
<!-- For instructions on building a set of images using Compose, see the section below on **Using Docker Compose to provision a rule execution environment** -->
Please see the instructions for each respective image for information on how to build the individual images.

Expand Down

0 comments on commit a0f8e3b

Please sign in to comment.