HUB
Sign inSign up
inception logo

cre8/inception

By cre8

•Updated over 7 years ago

Integrated dev/build environment on steroids using Docker-in-Docker workflow.

Image
0

364

cre8/inception repository overview

⁠Inception

Integrated dev/build environment on steroids using Docker-in-Docker workflow.

⁠Usage

Example using Docker Compose

version: '2.4'
services:

# Controlled Docker version
  docker:
    image: ${BASE_IMAGE_DOCKER:-docker:stable-dind}
    privileged: true
    expose:
      - 3000
    volumes:
      - .:/project
      - .aws:/root/.aws

# "builder" is a common configuration - not used directly.
# It is a bridge between Host and Docker-in-Docker environment.
  builder:
    image: ${BASE_IMAGE_BUILDER:-cre8/inception:latest}
    environment:
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_SESSION_TOKEN
      - AWS_DEFAULT_PROFILE
      - BOT_GPG_FILENAME
      - BOT_GPG_PASSPHRASE
      - BUILD_NUMBER
      - BUILD_PATH=/project/build
      - DOCKER_REGISTRY
      - EDITOR=vim
      - GNUPGHOME=${GNUPGHOME:-/root/.gnupg}
      - GPG=gpg2
      - PROJECT_PATH=/project
    working_dir: /project
    volumes:
      - .:/project
      - ./docker/builder/configs/docker_config.json:/root/.docker/config.json
      - .aws:/root/.aws

# "bk-common" is used by:
# - bk-dind
# - bk-dood
  bk-common:
    extends: builder
    privileged: true
    entrypoint: ["/entrypoint.sh"]
    volumes:
      - ./entrypoint.sh:/entrypoint.sh

# "bk-dind" is used inside "run" script
  bk-dind:
    extends: bk-common
    depends_on:
      - docker
    environment:
      DOCKER_HOST: tcp://docker:2375

# "bk-dood" is used inside "run" script
  bk-dood:
    extends: bk-common
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

⁠Docker Config

Create for example configs/docker_config.json file with:

{
  "credHelpers": {
    "YOUR-AWS-ACCOUNT-NUMBER.dkr.ecr.eu-west-1.amazonaws.com": "ecr-login"
  }
}
⁠Docker Compose
services:
  builder:
    image: cre8/inception
    volumes:
      - ./configs/docker_config.json:/root/.docker/config.json
⁠Docker Image
FROM cre8/inception
COPY configs/docker_config.json root/.docker/config.json

Tag summary

Content type

Image

Digest

Size

229.3 MB

Last updated

over 7 years ago

docker pull cre8/inception