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

Build: Unify custom dockerfiles, fix missing semicolon #59615

Merged
merged 3 commits into from Dec 1, 2022

Conversation

DanCech
Copy link
Collaborator

@DanCech DanCech commented Nov 30, 2022

While fixing the typo @grongor pointed out in #58101 I realized that we don't really need 2 custom dockerfiles either, this PR unifies them into a single file that can be used to build alpine or ubuntu-based custom images.

@DanCech DanCech added this to the 9.4.0 milestone Nov 30, 2022
@DanCech DanCech changed the title unify custom dockerfiles, fix missing semicolon Build: Unify custom dockerfiles, fix missing semicolon Nov 30, 2022
@DanCech DanCech added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Nov 30, 2022
Copy link
Collaborator

@chri2547 chri2547 left a comment

Choose a reason for hiding this comment

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

A suggestion and a question. Thank you for the contribution!

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Copy link
Collaborator

@chri2547 chri2547 left a comment

Choose a reason for hiding this comment

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

lgtm! Thanks!

@DanCech DanCech added type/bug backport v9.3.x and removed no-backport Skip backport of PR labels Dec 1, 2022
@DanCech DanCech modified the milestones: 9.4.0, 9.3.2 Dec 1, 2022
@kminehart
Copy link
Contributor

kminehart commented Dec 1, 2022

@DanCech if I run this with

docker build . --build-arg GRAFANA_TGZ=$PWD/grafana-enterprise-9.3.0.linux-amd64.tar.gz

I should expect this to build the docker image and skip all of the yarn install/yarn build/go gen/go build stuff and just use the assets from the tar file I provide, right? that doesn't seem to be happening 🤔

@DanCech
Copy link
Collaborator Author

DanCech commented Dec 1, 2022

@kminehart this is in packaging/docker/custom/ which doesn't use GRAFANA_TGZ, it builds on top of an official image.

To use the standard Dockerfile to build from TGZ you have to use buildkit and set JS_SRC and GO_SRC build args like the build scripts do

@kminehart
Copy link
Contributor

doh. for some reason I thought we also were able to get rid of the ones in packaging and only have 1 image for everything. Had a brain fart and thought that's what I was looking at.

@DanCech DanCech merged commit c4bb9d6 into main Dec 1, 2022
@DanCech DanCech deleted the unify-custom-dockerfile branch December 1, 2022 16:08
@grafanabot
Copy link
Contributor

The backport to v9.3.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-59615-to-v9.3.x origin/v9.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x c4bb9d637ea2a4cd16d90b64cf6cea88539edd6b
# Push it to GitHub
git push --set-upstream origin backport-59615-to-v9.3.x
git switch main
# Remove the local backport branch
git branch -D backport-59615-to-v9.3.x

Then, create a pull request where the base branch is v9.3.x and the compare/head branch is backport-59615-to-v9.3.x.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label Dec 1, 2022
DanCech added a commit that referenced this pull request Dec 1, 2022
* unify custom dockerfiles, fix missing semicolon

* tweak verbiage

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* update example description

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit c4bb9d6)
kwapik pushed a commit to fluxninja/grafana that referenced this pull request Jan 3, 2023
* unify custom dockerfiles, fix missing semicolon

* tweak verbiage

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* update example description

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
DanCech added a commit that referenced this pull request Jan 30, 2023
* unify custom dockerfiles, fix missing semicolon

* tweak verbiage

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* update example description

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit c4bb9d6)
zerok added a commit that referenced this pull request Mar 31, 2023
zerok added a commit that referenced this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v9.3.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. enterprise-ok no-changelog Skip including change in changelog/release notes type/bug type/build-packaging type/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants