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
55
Prepping Commits
alextercete
1
120
The end of your line-endings nightmare
alextercete
0
180
I love sushi, therefore I love rebase
alextercete
0
100
ReadyRoll for DotNet developers
alextercete
0
85
Coding Dojo: The Randori Kata
alextercete
1
480
How to be a good pair [programmer]
alextercete
0
130
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
710
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
Beyond ORM
77web
11
1.6k
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
120
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
Azure AI Foundryのご紹介
qt_luigi
1
210
ErdMap: Thinking about a map for Rails applications
makicamel
1
670
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
A Tale of Four Properties
chriscoyier
157
23k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Speed Design
sergeychernyshev
25
740
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
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!