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
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Jakarta EE meets AI
ivargrimstad
0
160
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
cmp.Or に感動した
otakakot
3
160
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
Arm移行タイムアタック
qnighy
0
320
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
110
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Typedesign – Prime Four
hannesfritz
40
2.4k
Ruby is Unlike a Banana
tanoku
97
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
RailsConf 2023
tenderlove
29
900
Why Our Code Smells
bkeepers
PRO
334
57k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
BBQ
matthewcrist
85
9.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
What's new in Ruby 2.0
geeforr
343
31k
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!