Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Contribution]: Publish the docker file in a docker registry #262

Closed
2 tasks done
luwangshell opened this issue Jan 25, 2023 · 8 comments
Closed
2 tasks done
Assignees
Labels

Comments

@luwangshell
Copy link

What happened?

It would be good to publish the docker image to a docker registry (e.g. GitHub Packages) so we could just consume and pass in the version of the sdk.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Feature Commitment

  • I commit to contributing this feature as a PR and working with the GSF to merge this feature into the Carbon Aware SDK.
@MartinDawson
Copy link

MartinDawson commented Jan 25, 2023

Right now we have to do something like this:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env

RUN wget https://github.com/Green-Software-Foundation/carbon-aware-sdk/archive/refs/tags/v1.0.0.zip

RUN apt-get update && \
  apt-get install unzip && \
  unzip v1.0.0.zip && \
  rm v1.0.0.zip

WORKDIR /carbon-aware-sdk-1.0.0/src
RUN dotnet publish CarbonAware.WebApi/src/CarbonAware.WebApi.csproj -c Release -o publish

FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /carbon-aware-sdk-1.0.0/src
COPY --from=build-env /carbon-aware-sdk-1.0.0/src/publish .

ENTRYPOINT ["dotnet", "CarbonAware.WebApi.dll"]

A few things would be a massive improvement in using the library:

  • Releasing versions more often. The last version was Oct. 22 and is 1.0.0 and quite out of date
  • Making your releases as packages. In the above code I have to wget the 1.0.0 manually because there's no package to install from a repo like docker or npm.
  • Publish your DockerFile to a registry so that we can easily consume them. If you did this then I wouldn't need to manually write the above DockerFile to use 1.0.0. I could just pull in your image in my docker-compose and pass the version in I wanted, i.e 1.0.0

Thanks for this great repo though, it's really amazing.

@github-actions
Copy link
Contributor

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

@github-actions github-actions bot added the stale label May 26, 2023
@danuw
Copy link
Collaborator

danuw commented Jun 5, 2023

Hi, thank you for those comments and sorry for the delay. We are in the process of making some of those changes, but feel free to create pull request or send links if there is anything missing. (Do you have a link for the scenario to publish registry to a container or what we have in the repo is enough now please?

@github-actions github-actions bot removed the stale label Jun 6, 2023
@YaSuenag
Copy link
Contributor

You already can pull WebAPI container image from GitHub Packages. Is it enough? https://github.com/Green-Software-Foundation/carbon-aware-sdk/pkgs/container/carbon-aware-sdk

Copy link
Contributor

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

@github-actions github-actions bot added the stale label Jan 28, 2024
@YaSuenag
Copy link
Contributor

I think we can close this issue.

Copy link
Contributor

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

@Sophietn
Copy link
Contributor

Closing because we use GitHub Packages to publish WebAPI container image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants