aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

Githubaction publish docker image

Open PaulWen opened this issue 3 years ago • 9 comments

Hi, @swcurran mentioned in today's AcaPug call that you would be interested in a pipeline for building and publishing AcaPy Docker images automatically for every tagged commit.

The GitHub Action below should do this. It is triggered for every tagged commit and will build the docker image using the docker/Dockerfile.run file. The images are being published in the GitHub package registry of this repo.

Example: If a commit is tagged with 0.7.4-rc6 an image will automatically be built and published with the following two tags:

  1. aries-cloudagent-python:latest
  2. aries-cloudagent-python:0.7.4-rc6

You can also see the build image in my forked version of this repo: https://github.com/PaulWen/aries-cloudagent-python/pkgs/container/aries-cloudagent-python

Let me know if this is of any help or if I misunderstood the requirements. I am happy to iterate over it and appreciate any feedback!

PaulWen avatar Jul 12 '22 17:07 PaulWen

Codecov Report

Merging #1856 (2a0bfe0) into main (ad1cad3) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1856   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files         536      536           
  Lines       34020    34020           
=======================================
  Hits        31886    31886           
  Misses       2134     2134           

codecov-commenter avatar Jul 12 '22 17:07 codecov-commenter

Cool stuff! @WadeBarnes, @andrewwhitehead -- please review.

Thanks!

swcurran avatar Jul 12 '22 18:07 swcurran

In reviewing this -- we probably should take a look at the Dockerfile being used to make sure it is up to date.

swcurran avatar Jul 12 '22 18:07 swcurran

I have a few questions with regards to the Dockerfile:

  1. Do you also use the Dockerfile.run to build the official AcaPy Docker images?
  2. Is the Dockerfile for the image bcgovimages/von-image:py36-1.15-1 open source too? Where can I find it?

PaulWen avatar Jul 13 '22 06:07 PaulWen

Hi @PaulWen -- flagging @WadeBarnes on this as well (although he is out for the rest of the week).

We build the Docker Hub bcgovimages from this repo: https://github.com/bcgov/aries-cloudagent-container

The dockerfile used for those images is here, with a python script used to provide the key details (e.g. the base image to use). You can see the args used for the different tagged images in the README for the repo.

swcurran avatar Jul 14 '22 15:07 swcurran

Thank you for the links!

What is the envisioned setup for the future? (A) Build the AcaPy Images within the Aries-Cloudagent-Container Repo. (B) Discontinue the Aries-Cloudagent-Container Repo and move the build files over into this repo. (C) ??

PaulWen avatar Jul 15 '22 09:07 PaulWen

Discontinue the Aries CloudAgent Container repo and publish directly from here. We may retain that repo as deprecated and pull an image from the new container repository to the bcgovimages repository for a bit until the bcgovimages are no longer being used.

swcurran avatar Jul 15 '22 14:07 swcurran

Sounds good! The final piece to this puzzle that I am still missing is the Dockerfile for the bcgovimages/von-image:py36-1.15-1 image that is used as the base image for the AcaPy images. I guess they were built via the bcgov/von-image repo?

This would leave us with the following todos:

  1. Build a new base image in bcgov/von-image to support the new Python as well as Ubuntu version
  2. Migrate the build script and Dockerfile from the Aries-Cloudagent-Container Repo into this repo

PaulWen avatar Jul 15 '22 15:07 PaulWen

I would think we would want to remove the dependency on von-image for the ACA-Py image. I think it would be better to bring it all into the ACA-Py repo for producing the image.

swcurran avatar Jul 15 '22 15:07 swcurran

Also covered in #1888

PaulWen avatar Aug 21 '22 07:08 PaulWen