Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -ex
PARENT_DIR=$(basename "${PWD%/*}")
CURRENT_DIR="${PWD##*/}"
IMAGE_NAME="discordbot"
REGISTRY="registry.starter-us-west-1.openshift.com/avior-bots"
docker login -u id -p editedtoken ${REGISTRY}
docker build -t ${REGISTRY}/${IMAGE_NAME} .
docker tag ${REGISTRY}/${IMAGE_NAME} ${REGISTRY}/${IMAGE_NAME}:latest
docker push ${REGISTRY}/${IMAGE_NAME}
docker tag ${REGISTRY}/${IMAGE_NAME}:latest ${REGISTRY}/${IMAGE_NAME}
docker push ${REGISTRY}/${IMAGE_NAME}
$ ../buildtagandpush.sh
++ basename /c/Users/2baze/Desktop
+ PARENT_DIR=Desktop
+ CURRENT_DIR=3.6
+ IMAGE_NAME=discordbot
+ REGISTRY=registry.starter-us-west-1.openshift.com/discord
+ docker login -u id -p editedtoken registry.starter-us-west-1.openshift.com/discord
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
+ docker build -t registry.starter-us-west-1.openshift.com/discord/discordbot .
Sending build context to Docker daemon 63.49kB
Step 1/11 : FROM centos/s2i-base-centos7
---> 6250e427b646
Step 2/11 : EXPOSE 8080
---> Using cache
---> e2263944932d
Step 3/11 : ENV PYTHON_VERSION=3.6 PATH=$HOME/.local/bin/:$PATH PYTHONUNBUFFERED=1 PYTHONIOENCODING=UTF-8 LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PIP_NO_CACHE_DIR=off
---> Using cache
---> 29a1bb521b56
Step 4/11 : ENV SUMMARY="Platform for building and running Python $PYTHON_VERSION applications" DESCRIPTION="Python $PYTHON_VERSION available as container is a base platform for building and running various Python $PYTHON_VERSION applications and frameworks. Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms."
---> Using cache
---> ee9ac09d8156
Step 5/11 : LABEL summary="$SUMMARY" description="$DESCRIPTION" io.k8s.description="$DESCRIPTION" io.k8s.display-name="Python 3.6" io.openshift.expose-services="8080:http" io.openshift.tags="builder,python,python36,rh-python36" com.redhat.component="python36-container" name="centos/python-36-centos7" version="1" usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.6/test/setup-test-app/ centos/python-36-centos7 python-sample-app" maintainer="SoftwareCollections.org <sclorg@redhat.com>"
---> Using cache
---> 3cbc1ed8daea
Step 6/11 : RUN INSTALL_PKGS="opus rh-python36 rh-python36-python-devel rh-python36-python-setuptools rh-python36-python-pip nss_wrapper httpd24 httpd24-httpd-devel httpd24-mod_ssl httpd24-mod_auth_kerb httpd24-mod_ldap httpd24-mod_session atlas-devel gcc-gfortran libffi-devel libtool-ltdl enchant" && yum install -y centos-release-scl && yum -y --setopt=tsflags=nodocs install --enablerepo=centosplus $INSTALL_PKGS && rpm -V $INSTALL_PKGS && rpm -e --nodeps centos-logos && yum -y clean all --enablerepo='*'
---> Using cache
---> 7e866556d6d7
Step 7/11 : COPY ./s2i/bin/ $STI_SCRIPTS_PATH
---> Using cache
---> 456f267a9fe2
Step 8/11 : COPY ./root/ /
---> Using cache
---> 145e5d82920e
Step 9/11 : RUN source scl_source enable rh-python36 && virtualenv ${APP_ROOT} && chown -R 1001:0 ${APP_ROOT} && fix-permissions ${APP_ROOT} -P && rpm-file-permissions
---> Using cache
---> 6cae2a96485b
Step 10/11 : USER 1001
---> Using cache
---> 19c5c106b3ae
Step 11/11 : CMD $STI_SCRIPTS_PATH/usage
---> Using cache
---> 711eedf90086
Successfully built 711eedf90086
Successfully tagged registry.starter-us-west-1.openshift.com/discord/discordbot:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
+ docker tag registry.starter-us-west-1.openshift.com/discord/discordbot registry.starter-us-west-1.openshift.com/discord/discordbot:latest
+ docker push registry.starter-us-west-1.openshift.com/discord/discordbot
The push refers to repository [registry.starter-us-west-1.openshift.com/discord/discordbot]
a408c326458c: Preparing
9bf5cfaffb2f: Preparing
50f158282ca3: Preparing
ce47081473e0: Preparing
a262a4b78e04: Preparing
9718d553386d: Preparing
8dc4bc757fd7: Preparing
a2ede2aafbc6: Preparing
bcc97fbfc9e1: Preparing
9718d553386d: Waiting
8dc4bc757fd7: Waiting
a2ede2aafbc6: Waiting
bcc97fbfc9e1: Waiting
unauthorized: authentication required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.