aws-samples / jenkins-on-aws

MIT No Attribution
58 stars 27 forks source link

Building docker images? #15

Closed sean-abbott closed 4 years ago

sean-abbott commented 4 years ago

Can you demonstrate or add to the readme how to build docker images inside this setup?

I'm looking at kaniko, but it's not immediately obvious how to integrate it with jenkins using the amazon-ecs plugin to run agents in fargate.

Thanks!

PS: Please update your "master" references to jenkins server?

adamjkeller commented 4 years ago

hey @sean-abbott Thanks for the heads up on the master references, cleaned them up.

Also, regarding docker images - they are built via the CDK. The dockerfiles are under the cdk/docker/ path, and the references to how they are built are in the code here:

https://github.com/aws-samples/jenkins-on-aws/blob/main/cdk/jenkins/jenkins_leader.py#L28 https://github.com/aws-samples/jenkins-on-aws/blob/main/cdk/jenkins/jenkins_worker.py#L22.

You can also build your own docker images, and modify the cdk code to pull from a docker hub repository or ECR as well.

Hope that answers your question :-)

karthikeayan commented 4 years ago

I think the question is about how to build docker images for the application we are building, not the jenkins itself.

sean-abbott commented 4 years ago

Karthikeayan is correct. :-)

adamjkeller commented 3 years ago

Hey all! I got it now, sorry for the misunderstanding.

I would recommend offloading docker image builds to AWS Codebuild: https://plugins.jenkins.io/aws-codebuild.

I'll create an issue for this.