Skip to content

Conversation

@tarkatronic
Copy link
Contributor

@tarkatronic tarkatronic commented Jun 26, 2023

This change does a few things for us:

  • Switch to using an official Go Docker image for the build so we can specify what version to build with.
  • Distribute using a distroless image, which is theoretically slimmer. Funny enough this actually increases the size from 18.9mb, to 29.1mb. But that's fine, it's still pretty small as far as Docker images go.
    • This now builds the final image FROM scratch, taking it down to only 11.8mb! 🙌🏻
  • Now using a non-root user to execute the bin, for a small security win
  • Add a (by default unused) "test" stage to the Dockerfile.
  • Test the Docker image during every CI build using that new "test" stage
  • Add MacOS 13 to the build matrix
  • Set up a CODEOWNERS file so we get PR review requests automatically. This is unrelated, but just necessary.

@tarkatronic tarkatronic requested a review from a team June 26, 2023 15:58
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #67 (2102abd) into main (9fd00e9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #67   +/-   ##
=======================================
  Coverage   51.80%   51.80%           
=======================================
  Files          13       13           
  Lines         500      500           
=======================================
  Hits          259      259           
  Misses        238      238           
  Partials        3        3           
Flag Coverage Δ
unittests 51.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tarkatronic tarkatronic requested review from a team, developerDemetri and yogurtandjam June 26, 2023 17:29
@tarkatronic tarkatronic merged commit 075bc43 into main Jun 26, 2023
@tarkatronic tarkatronic deleted the feat/improved-dockerfile branch June 26, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants