Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Improve the image building workflow #488

Merged
merged 2 commits into from
Sep 16, 2017

Conversation

foxish
Copy link
Member

@foxish foxish commented Sep 13, 2017

This will let us build and push the spark docker images using a single command from a downloaded release.
Also useful for folks trying to customize their images.

sbin/build-push-docker-images.sh -r <repo> -t <tag> build
sbin/build-push-docker-images.sh -r <repo> -t <tag> push

cc @ash211 @mccheah @erikerlandson @liyinan926

# with Kubernetes support.

declare -A path=( [spark-driver]=dockerfiles/driver/Dockerfile \
[spark-executor]=dockerfiles/executor/Dockerfile \

Choose a reason for hiding this comment

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

Execution failed

./build-push-docker-images.sh: line 22: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/jimmy/Workspace/github/rootsongjc/spark/dist/sbin/dockerfiles: no such file or directory
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/jimmy/Workspace/github/rootsongjc/spark/dist/sbin/dockerfiles: no such file or directory

Copy link
Member Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

MacOS bash version

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.

I updated it with this command:

brew install bash

Now bash version is 4.4.12(1)-release (x86_64-apple-darwin16.3.0)
The error disappeared.

Copy link

@rootsongjc rootsongjc Sep 14, 2017

Choose a reason for hiding this comment

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

As this script located at sbin/build-push-docker-images.sh but the path in the script based on dockerfile, this directory not in the base path.
This file should be in dict directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is meant to be run from a release that is built and published.

Copy link

@rootsongjc rootsongjc Sep 14, 2017

Choose a reason for hiding this comment

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

I put it to dist directory to run this script.

Copy link

@felixcheung felixcheung left a comment

Choose a reason for hiding this comment

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

LGTM.
we probably need some auth, image signing later on

@foxish
Copy link
Member Author

foxish commented Sep 15, 2017

Thanks for the review, merging when green.

@foxish
Copy link
Member Author

foxish commented Sep 15, 2017

rerun unit tests please

@foxish foxish merged commit 52fe7f5 into branch-2.2-kubernetes Sep 16, 2017
@foxish foxish deleted the image-builder-script branch September 16, 2017 17:57
@felixcheung
Copy link

I didn't find a thread on this so I'll comment here - found out more about the process and it turns out ASF Infra has support for building and publishing image to the official Apache account/owner.

I'll write up what I've found for the next chat.

ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 26, 2019
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants