Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2.1

orbs:
aws-ecr: circleci/aws-ecr@6.1.0

jobs:
say-hello:
executor: aws-ecr/default
steps:
- checkout
- run:
name: "Pull docker image"
command: "docker pull nginx"
- run:
name: "Scan docker image"
command: |
sudo apt-get install wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
sudo mkdir /imagesecreport
sudo trivy image --no-progress -format json --output /imagesecreport/scanning-report.txt nginx:latest
- store_artifacts:
path: /imagesecreport

say-tello:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: "Say hello"
command: "echo Tello, World!"

workflows:
say-hello-workflow:
jobs:
- say-hello
- say-tello:
requires:
- say-hello
36 changes: 36 additions & 0 deletions .circleci/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM node:16-alpine

# Install packages
RUN apk update && apk add --update --no-cache \
git \
bash \
curl \
openssh \
python3 \
py3-pip \
py-cryptography \
wget \
curl \
tar \
unzip \
ca-certificates


RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
RUN cd /opt && curl -sSl http://mirror.vorboss.net/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar -xz
RUN apk -U add --no-cache curl; \
curl https://downloads.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip > gradle.zip; \
unzip gradle.zip; \
rm gradle.zip; \
apk del curl; \
apk update && apk add --no-cache libstdc++ && rm -rf /var/cache/apk/*

RUN apk --no-cache add --virtual builds-deps build-base python3

# Update NPM
RUN npm config set unsafe-perm true
RUN npm update -g

# Install AWSCLI
RUN pip install --upgrade pip && \
pip install --upgrade awscli