-
Notifications
You must be signed in to change notification settings - Fork 14k
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(docker): simplification of assembly to facilitate further support #24504
Conversation
@@ -50,7 +50,7 @@ jobs: | |||
mkdir -p ./build | |||
echo ${{ github.sha }} > ./build/SHA | |||
echo ${{ github.event.pull_request.number }} > ./build/PR-NUM | |||
docker build --target ci -t ${{ github.sha }} -t "pr-${{ github.event.pull_request.number }}" . | |||
DOCKER_BUILDKIT=1 docker build --target ci -t ${{ github.sha }} -t "pr-${{ github.event.pull_request.number }}" . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runner already uses docker-buildx by default. Have a look here. So I don't think it is necessary setting this variable DOCKER_BUILDKIT=1
explicitly. Please correct me if I am wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastianliebscher Hello!
Originally my code didn't include this, but without it, an error pops up that this variable is not set and a build error occurs.
Apparently this feature is not used by default.
@craig-rueda @alekseyolg |
During the build of the image, a lot of unnecessary duplicate commands are passed, which are redundant. This PR allows you to correct this oversight and allows you to facilitate the process of further support by developers.
Added parameter
DOCKER_BUILDKIT=1
to add new features to build the image.Also in the docker-bootstrap.sh script, the if function has been replaced with a case - it looks much better and is easier to maintain. "Unknown Operation!!!" was added to make it clear to users in case of image customization what their mistake is.
TESTING INSTRUCTIONS
Manually build from the Dockerfile,
DOCKER_BUILDKIT=1 docker build -t superset
And the build should finish without error.
Successfully tagged superset:latest