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

Offline mode Ubuntu part - fixes #587

Merged
merged 3 commits into from
Oct 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ download_image() {
local dst_image="${dest_dir}/${repo_basename}-${tag}.tar"

#[[ ! -f $dst_image ]] || remove_file "$dst_image"
if [[ -f $dst_image ]]; then
echo "Image: "$dst_image" already exists. Skipping..."
if [[ -f ${dst_image} ]]; then
echo "Image: "${dst_image}" already exists. Skipping..."
else
local tmp_file=$(mktemp)
echo "Downloading image: $1"
echo "Skopeo command is: ./skopeo_linux --insecure-policy copy docker://$image_name docker-archive:$dst_image:$repository:$tag"
echo "Skopeo command is: ./skopeo_linux --insecure-policy copy docker://{$image_name} docker-archive:${dst_image}:${repository}:${tag}"
# use temporary file for downloading to be safe from sudden interruptions (network, ctrl+c)
./skopeo_linux --insecure-policy copy docker://$image_name docker-archive:$tmp_file:$repository:$tag && mv $tmp_file $dst_image
./skopeo_linux --insecure-policy copy docker://${image_name} docker-archive:${tmp_file}:${repository}:${tag} && chmod 644 ${tmp_file} && mv ${tmp_file} ${dst_image}
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -euo pipefail

# source common functions
. common.sh

if [[ $# -lt 1 ]]; then
usage
exit
Expand All @@ -31,8 +28,11 @@ deplist_cmd() {
apt-cache depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends $1
}

# source common functions
. "${script_path}/common.sh"

# install prerequisites which might be missing
apt install wget gpg
apt install -y wget gpg

# some quick sanity check
echo "dependency list: ${deplist}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ apache2
apache2-bin
apache2-utils

# for jq
libjq1

[files]
https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar
https://archive.apache.org/dist/kafka/2.0.0/kafka_2.12-2.0.0.tgz
Expand Down