Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hacking on Atomic Registry web console
#!/bin/bash
#
# for hacking on cockpit registry web UI
# using a container with bindmounted local js source
#
# on host, one time commands:
# cp containers/kubernetes/registry-dashboard-override.json pkg/kubernetes/override.json
# cp pkg/kubernetes/registry.html pkg/kubernetes/index.html
# Each dev cycle, run script with openshift hostname arg
OPENSHIFT_HOST=$1
if [ -z "$1" ] ; then
echo "USAGE: `basename "$0"` OPENSHIFT_HOSTNAME"
exit
fi
set -x
docker stop cockpit && docker rm cockpit
rm -rf /cockpit/dist
/cockpit/tools/webpack-make webpack.config.js
rm /cockpit/dist/kubernetes/override.json
docker run \
-d \
-e G_MESSAGES_DEBUG=cockpit-ws,cockpit-wrapper,cockpit-bridge \
-e OPENSHIFT_OAUTH_PROVIDER_URL=https://${OPENSHIFT_HOST}:8443 \
-e COCKPIT_KUBE_URL=https://${OPENSHIFT_HOST} \
-e KUBERNETES_SERVICE_HOST=${OPENSHIFT_HOST} \
-e KUBERNETES_SERVICE_PORT=8443 \
-e REGISTRY_ONLY=true \
-e REGISTRY_HOST=${OPENSHIFT_HOST}:5000 \
-e OPENSHIFT_OAUTH_CLIENT_ID=cockpit-oauth-client \
-e KUBERNETES_INSECURE=true \
--name cockpit \
-p 9090:9090 \
-v /cockpit/dist/:/root/.local/share/cockpit:Z \
cockpit/kubernetes
# -u 1001 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment