Doguhan Uluca
Questions? Tweet to @duluca
Slides? TheJavaScriptPromise.com
for discount codes visit
Features
Time
Quality
Roy Osherove
FROM
FROM
FROM
FROM
scratch
FROM
SETUP
Security
Dependencies
Host OS
Docker
Runtime
Image
Web Server
App
FROM
SETUP
COPY
Security
Dependencies
Host OS
Docker
Runtime
Docker Image
Web Server
App Code
Host OS
Docker
Runtime
minimal-node-web-server
Express.js
Angular
/dist
/usr/src/app
FROM
SETUP
COPY
CMD
Security
Dependencies
bit.ly/npmScriptsForDocker
.circleci/config.yml
.circleci/config.yml
version: 2
jobs:
build:
docker:
- image: docker:17.12.0-ce-git
working_directory: /usr/src
steps:
- checkout
- setup_remote_docker
...
Multi-stage Containers
FROM
FROM
FROM
as builder
as tester
COPY
from builder
CMD
FROM
FROM
FROM
as builder
as tester
COPY
from builder
CMD
minimal-node-build-env
alpine-node-chromium
minimal-nginx-web-server
.circleci/config.yml
build:
...
- run:
name: Execute Pipeline
command: |
docker build -f Dockerfile.integration . -t lemon-mart
...
- store_artifacts:
path: docker-cache/built-image.tar
destination: built-image.tar
- store_test_results:
path: tests/units.html
Declarative
Infrastructure-as-Code
Repeatable Integration
Local build
CI-x build
.circleci/config.yml
publish:
...
steps:
- restore_cache:
keys:
- built-image-{{ .BuildNum }}
- run:
name: Sign into AWS ecr
command: $(aws ecr get-login)
- run:
name: Push it to ECR
command: |
docker load < docker-cache/built-image.tar
docker tag my_app $AWS_ACCOUNT_ID.$AWS_URL/lemon-mart
docker push $AWS_ACCOUNT_ID.$AWS_URL/lemon-mart
bit.ly/npmScriptsForAWS
npm run aws:fargate-release
heroku container:push web -a lemon-mart
now --docker --public
n ➡️ n Flexibility
Questions? @duluca
Slides? TheJavaScriptPromise.com
for discount codes visit