Skip to content

makefile: create images using UID=1000, like what Bazel does#4860

Merged
jetstack-bot merged 1 commit intocert-manager:masterfrom
maelvls:make-user-1000
Feb 15, 2022
Merged

makefile: create images using UID=1000, like what Bazel does#4860
jetstack-bot merged 1 commit intocert-manager:masterfrom
maelvls:make-user-1000

Conversation

@maelvls
Copy link
Copy Markdown
Member

@maelvls maelvls commented Feb 15, 2022

In #4853, I noticed that the images built when running make -f make/Makefile all-containers have the User set to 0 instead of 1000.

@@ -1,7 +1,7 @@
 {
   "Hostname": "",
   "Domainname": "",
-  "User": "1000",
+  "User": "0",
   "AttachStdin": false,
   "AttachStdout": false,
   "AttachStderr": false,
@@ -13,9 +13,9 @@
     "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
   ],
   "Cmd": null,
-  "Image": "",
+  "Image": "sha256:3dceb771b9d8aa1905d11b7a45da095193cb1c6d41eb1429ca0ba9c63c002b03",
   "Volumes": null,
-  "WorkingDir": "/app/cmd/controller/controller.runfiles/com_github_jetstack_cert_manager",
+  "WorkingDir": "/",
   "Entrypoint": [
     "/app/cmd/controller/controller"
   ],

To reproduce:

git checkout 5f5ba9eff67a5a8b23ef2b88bc4403c20ead979e
bazel run --ui_event_filters=-info --noshow_progress --stamp=true --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 "//devel/addon/certmanager:bundle"
make -f make/Makefile bin/containers/cert-manager-controller-linux-amd64.tar.gz
docker import bin/containers/cert-manager-controller-linux-amd64.tar.gz
diff -u \
  <(docker inspect quay.io/jetstack/cert-manager-controller:$(git describe --tags --abbrev=14 | perl -p -e 's/-(\d+)-g/.$1-/') | jq '.[].Config') \
  <(docker inspect cert-manager-controller-amd64:$(git describe --tags) | jq '.[].Config')

/kind cleanup

NONE

Signed-off-by: Maël Valais <mael@vls.dev>
@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 15, 2022
Copy link
Copy Markdown
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

Good stuff, thanks!

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2022
@jetstack-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maelvls, SgtCoDFish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants