Public | Automated Build

Last pushed: 4 months ago
Short Description
This is for gitlab-ci to build docker image and push to AWS ECR
Full Description

docker-awscli

Example

.gitlab-ci.yml

image: handsome0710/docker-awscli

variables:
  DOCKER_DRIVER: overlay
  AWS_ACCESS_KEY_ID: "???"
  AWS_SECRET_ACCESS_KEY: "???"
  AWS_DEFAULT_REGION: "???"

services:
  - docker:dind

stages:
  - build

before_script:
  - $(aws ecr get-login --region ap-northeast-1)

build:
  stage: build
  script:
    - docker build -t xxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/$CI_PROJECT_NAME:latest .
    - docker push xxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/$CI_PROJECT_NAME:latest
Docker Pull Command
Owner
handsome0710
Source Repository

Comments (0)