Skip to content

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Apr 25, 2022

This PR will build cross-platform docker images for each release. Contributions are welcome!

Subtasks

  • create Dockerfile
  • create docker-compose will leave this for the Docs
  • build cross-platform images in goreleaser (this tutorial looks nice. I'll also look into how we do it for code-server

Fixes #1177

@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #1178 (0df2fe6) into main (f581724) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1178      +/-   ##
==========================================
+ Coverage   66.97%   67.02%   +0.04%     
==========================================
  Files         288      285       -3     
  Lines       18857    19022     +165     
  Branches      241      241              
==========================================
+ Hits        12630    12750     +120     
- Misses       4939     4951      +12     
- Partials     1288     1321      +33     
Flag Coverage Δ
unittest-go-macos-latest 54.19% <ø> (+0.14%) ⬆️
unittest-go-postgres- 65.61% <ø> (+0.19%) ⬆️
unittest-go-ubuntu-latest 56.60% <ø> (+0.15%) ⬆️
unittest-go-windows-2022 ?
unittest-js 74.19% <ø> (-0.05%) ⬇️
Impacted Files Coverage Δ
cli/configssh.go 62.58% <0.00%> (-6.48%) ⬇️
pty/ptytest/ptytest.go 86.95% <0.00%> (-4.35%) ⬇️
cli/templateinit.go 58.62% <0.00%> (-3.45%) ⬇️
coderd/workspaceagents.go 55.34% <0.00%> (-2.56%) ⬇️
agent/agent.go 64.66% <0.00%> (-2.48%) ⬇️
provisionerd/provisionerd.go 76.03% <0.00%> (-1.61%) ⬇️
coderd/organizations.go 56.23% <0.00%> (-1.01%) ⬇️
coderd/provisionerdaemons.go 63.31% <0.00%> (-0.17%) ⬇️
coderd/database/queries.sql.go 77.78% <0.00%> (-0.13%) ⬇️
cli/templates.go 100.00% <0.00%> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f581724...0df2fe6. Read the comment docs.

@bpmct bpmct force-pushed the bpmct/dockerfile branch from 3ccc6b2 to e7d26d1 Compare May 11, 2022 15:05
Comment on lines +26 to +28
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we need a PAT here. Will probably need help from an org admin to get this

from: https://carlosbecker.com/posts/multi-platform-docker-images-goreleaser-gh-actions/

We need to login into the GitHub Container Registry with a Personal Access Token (PAT), since the default GITHUB_TOKEN does not have enough permissions

@bpmct bpmct marked this pull request as ready for review May 11, 2022 16:50
@bpmct
Copy link
Member Author

bpmct commented May 11, 2022

This PR is ready for review, but I need help:

  1. generating an access token to replace GITHUB_TOKEN with additional scope for pushing to GHCR
  2. testing this before an actual release. Should I just use workflow_dispatch?

@bpmct bpmct requested a review from coadler May 11, 2022 16:51
@bpmct bpmct changed the title feat: build Docker images feat: build & release cross-platform Docker images May 11, 2022
@bpmct bpmct requested a review from kylecarbs May 11, 2022 18:56
@bpmct bpmct requested a review from kylecarbs May 12, 2022 15:43
@bpmct bpmct enabled auto-merge (squash) May 12, 2022 17:48
@bpmct bpmct merged commit bbb8f83 into main May 12, 2022
@bpmct bpmct deleted the bpmct/dockerfile branch May 12, 2022 17:59
@misskniss misskniss modified the milestones: Community MVP, V2 Beta May 15, 2022
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
* feat: add dockerfile and docker-compose

* build docker images on release

* add Docker dependencies to release.yaml

* remove docker compose for now

* fix license mismatch

* add docker-compose

* rename volume

* add WF dispatch for debugging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: build Docker images & document docker-compose
5 participants