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
200
Porting to .NET Standard
alextercete
0
53
Prepping Commits
alextercete
1
120
The end of your line-endings nightmare
alextercete
0
170
I love sushi, therefore I love rebase
alextercete
0
99
ReadyRoll for DotNet developers
alextercete
0
84
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
カスタムしながら理解するGraphQL Connection
yanagii
1
1.4k
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.9k
CSC509 Lecture 08
javiergs
PRO
0
110
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.2k
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
8
4.8k
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
190
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
490
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
0
120
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
110
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
73
9.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
BBQ
matthewcrist
85
9.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Writing Fast Ruby
sferik
627
61k
Thoughts on Productivity
jonyablonski
67
4.3k
Making Projects Easy
brettharned
115
5.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
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!