Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
impala/docker/push-images.sh at master · apache/impala · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
apache
impala
Repository navigation
Code
Pull requests
8
(8)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
impala
/
docker
/
push-images.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
92 lines (85 loc) · 2.46 KB
master
Breadcrumbs
impala
/
docker
/
push-images.sh
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
92 lines (85 loc) · 2.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!
/bin/bash
#
#
Licensed to the Apache Software Foundation (ASF) under one
#
or more contributor license agreements. See the NOTICE file
#
distributed with this work for additional information
#
regarding copyright ownership. The ASF licenses this file
#
to you under the Apache License, Version 2.0 (the
#
"License"); you may not use this file except in compliance
#
with the License. You may obtain a copy of the License at
#
#
http://www.apache.org/licenses/LICENSE-2.0
#
#
Unless required by applicable law or agreed to in writing,
#
software distributed under the License is distributed on an
#
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#
KIND, either express or implied. See the License for the
#
specific language governing permissions and limitations
#
under the License.
set
-euo pipefail
DIR=
$(
dirname
"
$0
"
)
usage
() {
echo
"
push_to_registry.sh [options]
"
echo
echo
"
Pushes the latest docker images created by a local Impala build to a docker
"
echo
"
registry, by default Docker Hub. Images must be prefixed with a string, which
"
echo
"
could be the docker hub username, a branch name, or some other identifier.
"
echo
echo
"
Supported options are:
"
echo
"
-p <image prefix>
"
echo
"
Append this image prefix to all images pushed to the registry. Required.
"
echo
"
-r <registry>
"
echo
"
Push to this registry. Optional, if not specified pushes to docker hub.
"
echo
"
-t <tag>
"
echo
"
Append this tag to all images before pushing them, Optional, defaults to
"
echo
"
empty.
"
echo
echo
"
Examples:
"
echo
"
To push to some user's repository on Docker Hub, with names like
"
echo
"
experimental-statestored:
"
echo
"
push_to_registry.sh -p someuser/experimental
"
}
PREFIX=
REGISTRY=
TAG=
while
getopts
"
p:r:t:
"
OPTION
do
case
"
$OPTION
"
in
p)
PREFIX=
"
$OPTARG
"
;;
r)
REGISTRY=
"
$OPTARG
"
;;
t)
TAG=
"
$OPTARG
"
;;
?
)
echo
"
Unknown option.
"
usage
exit
1
;
;;
esac
done
if
[[
-z
"
$PREFIX
"
]]
;
then
echo
"
-p must be specified
"
usage
exit
1
fi
#
The image tags that are updated by the impala build process.
IMAGES=
$(
cat
${DIR}
/docker-images.txt
)
echo
"
Images to push:
${IMAGES}
"
for
IMAGE
in
${IMAGES}
;
do
if
[[
-z
"
$REGISTRY
"
]]
;
then
#
Docker Hub does not require a prefix.
DEST=
else
DEST=
$REGISTRY
/
fi
DEST+=
"
$PREFIX
-
$IMAGE
"
if
[[
-n
"
$TAG
"
]]
;
then
DEST+=
"
:
$TAG
"
fi
docker image tag
"
$IMAGE
"
"
$DEST
"
docker push
"
$DEST
"
done
You can’t perform that action at this time.