2 Answers
- Newest
- Most votes
- Most comments
0
Would something like this be the right approach to run the container inside the build?
version: 0.2
phases:
install:
runtime-versions:
docker: 24
pre_build:
commands:
- docker pull my-docker-image:tag
- docker run -d --name policy-container my-docker-image:tag
build:
commands:
- sh integration_tests.sh
post_build:
commands:
- docker stop policy-container
- docker rm policy-container
answered a year ago
0
You can use AWS CI/CD stack: CodeCommit, CodeBuild, CodePipeline.
https://aws.amazon.com/codecommit/
https://aws.amazon.com/codebuild/
https://aws.amazon.com/codepipeline/
In a buildspec you can define all the needed commands:
https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
answered a year ago
Relevant content
- asked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
The latest version is docker: 20 in a buildspec. To avoid limits you need to log in:
version: 0.2
env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" DOCKERHUB_USERNAME: "/dockerhub/credentials:username" phases: install: commands: - echo pre_build step... - docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS - $(aws ecr get-login --no-include-email --region us-east-1)
In general, your buildspec is fine.