Skip to content

Instantly share code, notes, and snippets.

View phillipsj's full-sized avatar

Jamie Phillips phillipsj

View GitHub Profile
@phillipsj
phillipsj / install.sh
Last active September 6, 2023 06:21
Setup for Kubuntu 20.04 enhanced session.
#!/bin/bash
#
# This script is for Ubuntu 20.04 Focal Fossa to download and install XRDP+XORGXRDP via
# source.
#
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
#
###############################################################################
@phillipsj
phillipsj / myscript.sh
Created November 26, 2020 04:51
Just a script for testing.
#!/bin/bash
echo "It worked!"
@phillipsj
phillipsj / hosts
Created October 21, 2020 01:00
Adding sqlserver container hostname to hosts.
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
@phillipsj
phillipsj / sqlserver-run-with-host.sh
Last active October 21, 2020 00:52
Setting the hostname when running a SQL Server Container
$ docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=SuperCoolPass123" -p 1636:1433 --name sqlserver --hostname sqlserver -d mcr.microsoft.com/mssql/server:2019-latest
4ef2e5e0c9c91b4f1e86ef807262d0f639b10ae7364c9c9cce0996e3dc28d8db
@phillipsj
phillipsj / sqlserver-run-no-host.sh
Created October 21, 2020 00:33
Running SQL Server Container without hostname defined.
$ docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=SuperCoolPass123" -p 1635:1433 -d mcr.microsoft.com/mssql/server:2019-latest
Unable to find image 'mcr.microsoft.com/mssql/server:2019-latest' locally
2019-latest: Pulling from mssql/server
171857c49d0f: Pull complete
419640447d26: Pull complete
61e52f862619: Pull complete
e7083eff87ee: Pull complete
8b5eb8c165f6: Pull complete
b469c4d6160e: Pull complete
ec9a85cf10f9: Pull complete
@phillipsj
phillipsj / azure-pipelines.yml
Created October 20, 2020 00:23
Azure DevOps Pipeline YAML for building database backup containers.
trigger:
- master
stages:
- stage: BackupTests
displayName: Test Database Backups
pool:
vmImage: 'Ubuntu-18.04'
jobs:
@phillipsj
phillipsj / build-execution.ps1
Created October 20, 2020 00:16
Running of the build script.
$ .\build.ps1
[+] Building 0.2s (8/8) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 981B 0.0s
=> [internal] load metadata for mcr.microsoft.com/mssql/server:2019-CU5-ubuntu-18.04 0.1s
=> [internal] load build context 0.0s
=> => transferring context: 46B 0.0s
=> [1/3] FROM mcr.microsoft.com/mssql/server:2019-CU5-ubuntu-18.04@sha256:a4c896f11c73fd6eecaab1b96eb256c6bc0bdc 0.0s
@phillipsj
phillipsj / file-trees.sh
Last active October 20, 2020 00:16
File tree
$ tree .\backup-tests\ /f
~\BACKUP-TESTS
│ README.md
├───adventureworks2017
│ Dockerfile
└───adventureworks2019
Dockerfile
@phillipsj
phillipsj / build.ps1
Created October 17, 2020 02:50
Building our backup containers
if ((Get-ChildItem -Recurse -Path **\\Dockerfile).Count -gt 0) {
$dockerFiles = Get-ChildItem -Recurse -Path **\\Dockerfile | Select-Object -ExpandProperty DirectoryName -Unique
$dockerFiles | ForEach-Object {
Push-Location $_;
$directory = Get-Item Dockerfile | Select-Object -ExpandProperty Directory
docker build -t $directory.Name .
Pop-Location;
}
}
else {
@phillipsj
phillipsj / DatabaseTests.ps1
Last active October 17, 2020 02:43
Really simple test for a database.
function Invoke-DatabaseTest
{
param(
[parameter(mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $DatabasePort,
[parameter(mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $DatabaseName,
)