Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
docker-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
infra
docker
docker-cli
Commits
c3663b89
Commit
c3663b89
authored
Jul 29, 2019
by
Kevin Daudt
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add auxilary scripts that help managing images
parent
aa468a96
Pipeline
#118
passed with stage
in 21 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
+71
-0
Dockerfile
Dockerfile
+2
-0
README.md
README.md
+26
-0
scripts/docker-push-image
scripts/docker-push-image
+12
-0
scripts/docker-push-manifest
scripts/docker-push-manifest
+31
-0
No files found.
Dockerfile
View file @
c3663b89
FROM
alpine:latest
RUN
apk add
--no-cache
docker-cli
COPY
scripts/ /usr/local/bin/
README.md
View file @
c3663b89
# docker-cli
Docker CLI tools based on Alpine.
## Helper scripts
### docker-push-image
Tags
`<source_image>`
as
`<target_image>`
and pushes it to the registry.
**Usage**
:
docker-push-image <source_image> <target_image>
### docker-push-manifest
Creates and pushes a docker manifest based on multiple source images.
**Usage**
:
```
docker-push-manifest <manifest> <image_prefix> <tag_suffix> <tag_suffix>..
<manifest> The name of the manifest to create and pushed
<image_prefix> The common prefix of each source image
<tag_prefix> One or more suffixes to that are used to specify the
source images
```
scripts/docker-push-image
0 → 100755
View file @
c3663b89
#!/bin/sh
if
[
$?
-lt
2
]
;
then
echo
"Usage:
$0
<source_image> <target_image>"
exit
0
fi
source_image
=
$1
target_image
=
$2
docker tag
"
$source_image
"
"
$target_image
"
docker push
"
$target_image
"
scripts/docker-push-manifest
0 → 100755
View file @
c3663b89
#!/bin/sh
if
[
$?
-lt
2
]
;
then
echo
"Usage:
$0
<manifest> <image_prefix> <tag_suffixes>.."
exit
0
fi
manifest
=
$1
image_prefix
=
$2
shift
2
;
if
[
$?
-lt
1
]
;
then
echo
"No tag suffixes supplied, nothing to do"
exit
1
fi
tag_suffixes
=
"
$@
"
images
=
""
for
tag_suffix
in
$tag_suffixes
;
do
image
=
"
$image_prefix$tag_suffix
"
images
=
"
$images
$image
"
done
echo
docker manifest create
--amend
"
$manifest
"
$images
docker manifest create
--amend
"
$manifest
"
$images
echo
docker manifest push
--purge
"
$manifest
"
docker manifest push
--purge
"
$manifest
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment