This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=N0750much54f3' -p 1433:1433 -d mcr.microsoft.com/mssql/server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
USER root | |
WORKDIR /home/app | |
ADD https://raw.githubusercontent.com/cloudstateu/containers-w3-homework/master/package.json /home/app/package.json | |
ADD https://raw.githubusercontent.com/cloudstateu/containers-w3-homework/master/index.js /home/app/index.js | |
RUN apk add --no-cache nodejs npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$teamsNotification = @{ | |
'@type' = 'MessageCard' | |
'@context'= 'http://schema.org/extensions' | |
'themeColor' = '0076D7' | |
'summary' = 'Successful build notification' | |
'sections' = @( | |
@{ | |
'activityTitle' = "$(Build.DefinitionName)" | |
'activitySubtitle' = "image tag $(Build.BuildNumber) deployed to registry" | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ipTracking="10.200.0.109" | |
while(1) | |
{ | |
$date=get-date -format "yyyy/MM/dd HH:mm:ss" | |
$connections =(get-nettcpconnection -remoteaddress $ipTracking ` | |
-ErrorAction SilentlyContinue ` | |
| select-object -Property LocalAddress,LocalPort,RemoteAddress,RemotePort,State, ` | |
@{name='Process';expression={(Get-Process -Id $_.OwningProcess).Name}},CreationTime ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more /etc/docker/registry/config.yml | |
version: 0.1 | |
log: | |
fields: | |
service: registry | |
storage: | |
delete: | |
enabled: true | |
cache: | |
blobdescriptor: inmemory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
WORKDIR / | |
RUN wget -q -O sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=873926 | |
RUN mkdir /opt/sqlpackage | |
RUN unzip -qq sqlpackage.zip -d /opt/sqlpackage | |
FROM mcr.microsoft.com/dotnet/core/runtime-deps:2.1 | |
RUN apt-get -qq update | |
# I don't understand why libunwind is required but it is | |
RUN apt-get -qq install libunwind8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps -q -f name=utmsp_backend | xargs docker inspect -f '{{.State.Pid}}' | xargs -i nsenter -t {} -n netstat|grep :mysql|grep ESTABLISHED| cut -d ":" -f1|awk '{print $4}'|uniq -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps -q -f name=utmsp_backend | xargs docker inspect -f '{{.State.Pid}}' | xargs -i nsenter -t {} -n netstat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps --format "table {{.ID}}\t{{.Names}}\t{{.RunningFor}}\t{{.Status}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker stats --format "table {{.Name}}\t{{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}" |