Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Shipping containers
Search
Alex Tercete
March 19, 2019
Programming
0
52
Shipping containers
How containers will change the way we ship software.
Alex Tercete
March 19, 2019
Tweet
Share
More Decks by Alex Tercete
See All by Alex Tercete
Making Makefiles
alextercete
0
64
Parallelism and Symmetry
alextercete
0
210
Porting to .NET Standard
alextercete
0
53
Prepping Commits
alextercete
1
120
The end of your line-endings nightmare
alextercete
0
180
I love sushi, therefore I love rebase
alextercete
0
99
ReadyRoll for DotNet developers
alextercete
0
85
Coding Dojo: The Randori Kata
alextercete
1
470
How to be a good pair [programmer]
alextercete
0
120
Other Decks in Programming
See All in Programming
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Zoneless Testing
rainerhahnekamp
0
120
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
Recoilを剥がしている話
kirik
5
6.6k
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Symfony Mapper Component
soyuka
2
730
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Featured
See All Featured
Done Done
chrislema
181
16k
The Cult of Friendly URLs
andyhume
78
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Building Your Own Lightsaber
phodgson
103
6.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Transcript
Shipping containers How containers will change the way we ship
software
https://www.pexels.com/photo/business-cargo-cargo-container-city-262353/
• Basic concepts • Containers in the wild • How
could Redgate leverage containers? • What’s next? Table of contents
macOS web app dep1 dep2 8000
macOS linux web app dep1 dep2 8000
macOS linux web app dep1 dep2 8000 8000
macOS linux CLI dep1 dep2 >_ >_
FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX 1251debdf2 2346ad27d7
568ba9896f 1b7da6b599 1b7da6b599 Dockerfile image container
FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX 1251debdf2 2346ad27d7
568ba9896f 1b7da6b599 1b7da6b599 127a749973 30285e40a4 072756f83c 79b149c433 532e43ed02 1251debdf2 8a05d95840 2346ad27d7 409df063b4 568ba9896f ca548745fe 1b7da6b599 Dockerfile image registry container
• CLIs, services and databases • CI/CD agents • Orchestration
Containers in the wild
None
None
$ docker run --rm mesosphere/aws-cli --version
$ docker run --rm mesosphere/aws-cli --version aws-cli/1.14.5 Python/2.7.13 Linux/4.9.125-li…
$ docker run --rm mesosphere/aws-cli --version aws-cli/1.14.5 Python/2.7.13 Linux/4.9.125-li… image
name makes container ephemeral AWS CLI command-line arguments
$ docker run --rm \ -e "AWS_ACCESS_KEY_ID=$(AWS_ID)" \ -e "AWS_SECRET_ACCESS_KEY=$(AWS_SECRET)"
\ mesosphere/aws-cli \ ecr list-images
$ docker run --rm \ -e "AWS_ACCESS_KEY_ID=$(AWS_ID)" \ -e "AWS_SECRET_ACCESS_KEY=$(AWS_SECRET)"
\ mesosphere/aws-cli \ ecr list-images AWS CLI command-line arguments defines environment variables
None
test_migrations.sh #!/bin/bash docker run \ -e POSTGRES_PASSWORD=mypwd -p 5432:5432 -d
postgres:11 docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ -url=jdbc:postgresql://host.docker.internal:5432/postgres \ -user=postgres \ -password=mypwd \ migrate
test_migrations.sh #!/bin/bash docker run \ -e POSTGRES_PASSWORD=mypwd -p 5432:5432 -d
postgres:11 docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ -url=jdbc:postgresql://host.docker.internal:5432/postgres \ -user=postgres \ -password=mypwd \ migrate
macOS linux CLI dep1 dep2 linux DB 5432 5432 host.docker.internal
macOS linux CLI dep1 dep2 linux DB 5432 mydb mynet
test_migrations.diff #!/bin/bash +docker network create mynet + -docker run \
+docker run --name mydb --network mynet \ -e POSTGRES_PASSWORD=mypwd -d postgres:11 -docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ - -url=jdbc:postgresql://host.docker.internal:5432/postgres \ +docker run --rm --network mynet -v $(pwd):/flyway/sql boxfuse/flyway:5 \ + -url=jdbc:postgresql://mydb:5432/postgres \ -user=postgres \ -password=mypwd \ migrate
None
None
dev.azure.com on-prem cloud Hosted agents
None
dev.azure.com on-prem cloud Containerised hosted agents Containerised local agent
None
None
DLL
None
None
• Containerised SQL Compare CLI • Base images for SQL
Change Automation • Redgate Platform deployment models How could Redgate leverage containers?
None
Windows >_ sqlcompare .NET Framework 4.6.1
> sqlcompare ` /Database1:WidgetStaging ` /Database2:WidgetProduction ` /Synchronize
None
Host 13.6.0 Container >_ sqlcompare .NET Core 2.2 >_
Host Container >_ sqlcompare .NET Core 3.0 >_ 14.0.0
$ docker run --rm \ -e "SERIAL_NUMBER=$(RG_SERIAL_NUMBER)" \ redgate/sql-compare:13.6.0 \
synchronize \ --source WidgetStaging \ --destination WidgetProduction
$ docker run --rm \ -e "SERIAL_NUMBER=$(RG_SERIAL_NUMBER)" \ redgate/sql-compare:13.6.0 \
synchronize \ --source WidgetStaging \ --destination WidgetProduction image name version tag command-line arguments
A word on multi-stage builds
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore
RUN dotnet publish -c Release -o out ENTRYPOINT ["dotnet", "out/MySolution.MyProject.dll"] Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore
RUN dotnet publish -c Release -o out ENTRYPOINT ["dotnet", "out/MySolution.MyProject.dll"] Dockerfile build-specific
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN
dotnet restore RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime WORKDIR /app COPY --from=build /app/src/MySolution.MyProject/out ./ ENTRYPOINT ["dotnet", "MySolution.MyProject.dll"] Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN
dotnet restore RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime WORKDIR /app COPY --from=build /app/src/MySolution.MyProject/out ./ ENTRYPOINT ["dotnet", "MySolution.MyProject.dll"] Dockerfile
FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX FROM XXX
COPY --from ENTRYPOINT 53c59901c1 afa0e18698 ade8f7e850 a36426ba37 97c11f30b3 Dockerfile container 39603b1de3 d54c37ce8b 97c11f30b3 image (stage 1) image (stage 0)
$ docker build -t myimage . $ docker run --name
myapp -p 5000:80 myimage
Host Container 5000 MySolution.MyProject ASP.NET Core 2.2 80
None
FROM redgate/sql-change-automation:1.0-sdk AS build COPY ./MyProject.Database /project WORKDIR /project RUN
sca publish ./MyProject.Database.sqlproj --output ./artifacts FROM redgate/sql-change-automation:1.0-mssql AS db COPY --from=build /project/artifacts /sca/artifacts Dockerfile
FROM redgate/sql-change-automation:1.0-sdk AS build COPY ./MyProject.Database /project WORKDIR /project RUN
sca publish ./MyProject.Database.sqlproj --output ./artifacts FROM redgate/sql-change-automation:1.0-mssql AS db COPY --from=build /project/artifacts /sca/artifacts Dockerfile 1.0-oracle 1.0-postgres 1.0-mysql
None
• OS-native server • Redgate-provided cluster • Customer cluster Proposed
deployment models
• OS-native server • Redgate-provided cluster • Customer cluster Proposed
deployment models
None
None
What if users don't have Docker installed?
is the new
What can we do to prepare for the future?
coming soon...
Play with Docker https://training.play-with-docker.com/ Katacoda https://www.katacoda.com/courses/docker Docker Documentation https://docs.docker.com/develop/ Learning
resources
Thanks!