summaryrefslogtreecommitdiffstats
path: root/redhat/docker/opensuse.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2018-11-27 21:34:48 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2018-11-27 21:34:48 +0100
commita615d19df88eb2e989316b480519161945dbc7dc (patch)
tree369970b98042998b86c11024598155e037b76fec /redhat/docker/opensuse.sh
parent76a93e0011ade1583a1ec672f33411dfd35454f3 (diff)
downloadtde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.tar.gz
tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.zip
RPM: merge redhat directory with master branch
Diffstat (limited to 'redhat/docker/opensuse.sh')
-rwxr-xr-xredhat/docker/opensuse.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/redhat/docker/opensuse.sh b/redhat/docker/opensuse.sh
new file mode 100755
index 000000000..27a131c76
--- /dev/null
+++ b/redhat/docker/opensuse.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+NAME="opensuse"
+VERSION="$1" # E.g: '42.3'
+IMAGE="${NAME}:${VERSION}"
+INSTALLROOT="/dev/shm/${IMAGE}"
+
+sudo rm -rf "${INSTALLROOT}"
+sudo mkdir -p "${INSTALLROOT}"
+
+sudo zypper --root "${INSTALLROOT}" \
+ ar "http://download.opensuse.org/distribution/leap/${VERSION}/repo/oss/" "oss"
+sudo zypper --root "${INSTALLROOT}" \
+ ar "http://download.opensuse.org/distribution/leap/${VERSION}/repo/non-oss/" "non-oss"
+sudo zypper --root "${INSTALLROOT}" \
+ ar "http://download.opensuse.org/update/leap/${VERSION}/oss/" "update-oss"
+sudo zypper --root "${INSTALLROOT}" \
+ ar "http://download.opensuse.org/update/leap/${VERSION}/non-oss/" "update-non-oss"
+sudo zypper --root "${INSTALLROOT}" \
+ --gpg-auto-import-keys ref
+sudo zypper --root "${INSTALLROOT}" \
+ install -y bash vim zypper openSUSE-release
+
+sudo tar -C "${INSTALLROOT}" -c . >"${IMAGE}.tar"
+sudo rm -rf "${INSTALLROOT}"
+
+docker rmi -f "${IMAGE}"
+docker import "${IMAGE}.tar" "${IMAGE}"