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

build fails #1

Open
ryran opened this issue May 16, 2019 · 2 comments
Open

build fails #1

ryran opened this issue May 16, 2019 · 2 comments

Comments

@ryran
Copy link

ryran commented May 16, 2019

I'm intrigued by the prospect of this, even though I don't quite understand yet what it will offer. That is to say, I can't get it to work yet.

$ git clone [email protected]:lpsantil/ocp-shellinabox.git
...
$ cd ocp-shellinabox

Using either template, the build fails. Either with librhsm-WARNING **: 03:25:44.883: Found 0 entitlement certificates ....

$ oc new-project siab
...

$ oc apply -f siab.template.yaml 
imagestream.image.openshift.io/rhel7-minimal created
buildconfig.build.openshift.io/siab created
serviceaccount/siab created
deploymentconfig.apps.openshift.io/siab created
imagestream.image.openshift.io/siab created
service/siab created
route.route.openshift.io/siab created

oc logs -f bc/siab
Cloning "https://github.com/lpsantil/ocp-shellinabox.git" ...
	Commit:	d33bca851cf115cabdc94dc138ec3755d0adf55e (Fix home dir perms in Dockerfile)
	Author:	lpsantil <[email protected]>
	Date:	Tue Mar 12 22:18:52 2019 -0700
Replaced Dockerfile FROM image registry.access.redhat.com/rhel7-minimal
Caching blobs under "/var/cache/blobs".

Pulling image registry.access.redhat.com/rhel7-minimal@sha256:56c2845341d91301f2de6e705e6acd4323e9b0bb76158ac72681feffc598d704 ...
Getting image source signatures
Copying blob sha256:d44d4222b7ab87405696a91a8af36dedcb2bf3faa86a779561ec07c71f104c8c
Copying blob sha256:25d1e8e92143ef29f6a43518fcd708d3f5bd796a3ca7eaab51012bf66a9fb38e
Copying config sha256:5129f0b3013a21b330e515ff3a2c3ed2a6a2dc2fc796d55974deae897d38cfeb
Writing manifest to image destination
Storing signatures
5129f0b3013a21b330e515ff3a2c3ed2a6a2dc2fc796d55974deae897d38cfeb
STEP 1: FROM registry.access.redhat.com/rhel7-minimal@sha256:56c2845341d91301f2de6e705e6acd4323e9b0bb76158ac72681feffc598d704
STEP 2: MAINTAINER Louis P. Santillan <[email protected]>
STEP 3: WORKDIR /tmp
STEP 4: USER 0
STEP 5: ADD startsiab.sh /opt/startsiab.sh
STEP 6: ADD siab.logo.txt /opt/siab.logo.txt
STEP 7: ADD black-on-white.css /usr/share/shellinabox/black-on-white.css
STEP 8: ADD dockerfile.nanorc /usr/share/nano/dockerfile.nanorc
STEP 9: ADD javascript.nanorc /usr/share/nano/javascript.nanorc
STEP 10: ADD nanorc /tmp/nanorc
STEP 11: ADD motd /etc/motd
STEP 12: RUN echo "" &&     cat /opt/siab.logo.txt &&     echo "=== Installing EPEL ===" &&     curl -o /tmp/epel.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm &&     rpm -ivh /tmp/epel.rpm &&     echo "\n=== Installing developer tools ===" &&     microdnf        --enablerepo=rhel-7-server-rpms        --enablerepo=rhel-7-server-extras-rpms        --enablerepo=rhel-7-server-optional-rpms        --enablerepo=rhel-7-server-ose-3.11-rpms        --enablerepo=rhel-7-server-devtools-rpms        --enablerepo=rhel-server-rhscl-7-rpms        --enablerepo=epel        install        jq vim screen which hostname passwd tmux nano wget git        bash-completion openssl shellinabox util-linux expect        atomic-openshift-clients     &&     microdnf clean all &&     cd /tmp &&     echo "\n=== Installing 'developer' user ===" &&     useradd -u 1001 developer -m &&     mkdir -pv /home/developer/bin /home/developer/tmp &&     echo "\n=== Bringing in nano's user config ===" &&     mv -v /tmp/nanorc /home/developer/.nanorc &&     echo "\n=== Giving nano's user config the correct ownership ===" &&     chown -R 1001:1001 /home/developer &&     echo "\n=== Setting the default password for our 'developer' user ===" &&     ( echo "developer" | passwd developer --stdin ) &&     echo "\n=== Randomizing root's password ===" &&     ( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1 | passwd root --stdin ) &&     echo "\n=== Removing login's lock file ===" &&     rm -f /var/run/nologin &&     echo "*** Done building siab container ***" &&     cat /opt/siab.logo.txt &&     echo ""

   ██████  ██▓ ▄▄▄       ▄▄▄▄   
 ▒██    ▒ ▓██▒▒████▄    ▓█████▄ 
 ░ ▓██▄   ▒██▒▒██  ▀█▄  ▒██▒ ▄██
   ▒   ██▒░██░░██▄▄▄▄██ ▒██░█▀  
 ▒██████▒▒░██░ ▓█   ▓██▒░▓█  ▀█▓
 ▒ ▒▓▒ ▒ ░░▓   ▒▒   ▓▒█░░▒▓███▀▒
 ░ ░▒  ░ ░ ▒ ░  ▒   ▒▒ ░▒░▒   ░ 
 ░  ░  ░   ▒ ░  ░   ▒    ░    ░ 
       ░   ░        ░  ░ ░      
                              ░ 
 
=== Installing EPEL ===
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15080  100 15080    0     0  47944      0 --:--:-- --:--:-- --:--:-- 48025
warning: /tmp/epel.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ########################################
Updating / installing...
epel-release-7-11                     ########################################
\n=== Installing developer tools ===

(process:289): librhsm-WARNING **: 03:25:44.883: Found 0 entitlement certificates

(process:289): librhsm-WARNING **: 03:25:44.885: Found 0 entitlement certificates
error: (--enablerepo) repo rhel-7-server-rpms not found
subprocess exited with status 1
subprocess exited with status 1
error: build error: error building at STEP "RUN echo "" &&     cat /opt/siab.logo.txt &&     echo "=== Installing EPEL ===" &&     curl -o /tmp/epel.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm &&     rpm -ivh /tmp/epel.rpm &&     echo "\n=== Installing developer tools ===" &&     microdnf        --enablerepo=rhel-7-server-rpms        --enablerepo=rhel-7-server-extras-rpms        --enablerepo=rhel-7-server-optional-rpms        --enablerepo=rhel-7-server-ose-3.11-rpms        --enablerepo=rhel-7-server-devtools-rpms        --enablerepo=rhel-server-rhscl-7-rpms        --enablerepo=epel        install        jq vim screen which hostname passwd tmux nano wget git        bash-completion openssl shellinabox util-linux expect        atomic-openshift-clients     &&     microdnf clean all &&     cd /tmp &&     echo "\n=== Installing 'developer' user ===" &&     useradd -u 1001 developer -m &&     mkdir -pv /home/developer/bin /home/developer/tmp &&     echo "\n=== Bringing in nano's user config ===" &&     mv -v /tmp/nanorc /home/developer/.nanorc &&     echo "\n=== Giving nano's user config the correct ownership ===" &&     chown -R 1001:1001 /home/developer &&     echo "\n=== Setting the default password for our 'developer' user ===" &&     ( echo "developer" | passwd developer --stdin ) &&     echo "\n=== Randomizing root's password ===" &&     ( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1 | passwd root --stdin ) &&     echo "\n=== Removing login's lock file ===" &&     rm -f /var/run/nologin &&     echo "*** Done building siab container ***" &&     cat /opt/siab.logo.txt &&     echo """: exit status 1

Or with microdnf: command not found...

$ oc new-project siab2
...

$ oc apply -f siab.rhel7.template.yaml
imagestream.image.openshift.io/rhel7 created
buildconfig.build.openshift.io/siab created
serviceaccount/siab created
deploymentconfig.apps.openshift.io/siab created
imagestream.image.openshift.io/siab created
service/siab created
route.route.openshift.io/siab created

$ oc logs -f bc/siab
Cloning "https://github.com/lpsantil/ocp-shellinabox.git" ...
	Commit:	d33bca851cf115cabdc94dc138ec3755d0adf55e (Fix home dir perms in Dockerfile)
	Author:	lpsantil <[email protected]>
	Date:	Tue Mar 12 22:18:52 2019 -0700
Replaced Dockerfile FROM image registry.access.redhat.com/rhel7-minimal
Caching blobs under "/var/cache/blobs".

Pulling image registry.access.redhat.com/rhel7@sha256:a5202c981262481dffc11f7e2e69e7b19126965ceeb021cbe597e19babb14275 ...
Getting image source signatures
Copying blob sha256:d69140bdce18c2f525b2ad0cc3998a1c6f2bc0a850353b7b7feac66eca1da526
Copying blob sha256:a82dd37af30d5ff9e805ceea67ea615a17dfaafba3135b12e6b2dab29ee2cff2
Copying config sha256:5044f6040ea5535b508dcade2cbee564dae54907ed47ee6002c8cd6e39c60c3c
Writing manifest to image destination
Storing signatures
5044f6040ea5535b508dcade2cbee564dae54907ed47ee6002c8cd6e39c60c3c
STEP 1: FROM registry.access.redhat.com/rhel7@sha256:a5202c981262481dffc11f7e2e69e7b19126965ceeb021cbe597e19babb14275
STEP 2: MAINTAINER Louis P. Santillan <[email protected]>
STEP 3: WORKDIR /tmp
STEP 4: USER 0
STEP 5: ADD startsiab.sh /opt/startsiab.sh
STEP 6: ADD siab.logo.txt /opt/siab.logo.txt
STEP 7: ADD black-on-white.css /usr/share/shellinabox/black-on-white.css
STEP 8: ADD dockerfile.nanorc /usr/share/nano/dockerfile.nanorc
STEP 9: ADD javascript.nanorc /usr/share/nano/javascript.nanorc
STEP 10: ADD nanorc /tmp/nanorc
STEP 11: ADD motd /etc/motd
STEP 12: RUN echo "" &&     cat /opt/siab.logo.txt &&     echo "=== Installing EPEL ===" &&     curl -o /tmp/epel.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm &&     rpm -ivh /tmp/epel.rpm &&     echo "\n=== Installing developer tools ===" &&     microdnf        --enablerepo=rhel-7-server-rpms        --enablerepo=rhel-7-server-extras-rpms        --enablerepo=rhel-7-server-optional-rpms        --enablerepo=rhel-7-server-ose-3.11-rpms        --enablerepo=rhel-7-server-devtools-rpms        --enablerepo=rhel-server-rhscl-7-rpms        --enablerepo=epel        install        jq vim screen which hostname passwd tmux nano wget git        bash-completion openssl shellinabox util-linux expect        atomic-openshift-clients     &&     microdnf clean all &&     cd /tmp &&     echo "\n=== Installing 'developer' user ===" &&     useradd -u 1001 developer -m &&     mkdir -pv /home/developer/bin /home/developer/tmp &&     echo "\n=== Bringing in nano's user config ===" &&     mv -v /tmp/nanorc /home/developer/.nanorc &&     echo "\n=== Giving nano's user config the correct ownership ===" &&     chown -R 1001:1001 /home/developer &&     echo "\n=== Setting the default password for our 'developer' user ===" &&     ( echo "developer" | passwd developer --stdin ) &&     echo "\n=== Randomizing root's password ===" &&     ( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1 | passwd root --stdin ) &&     echo "\n=== Removing login's lock file ===" &&     rm -f /var/run/nologin &&     echo "*** Done building siab container ***" &&     cat /opt/siab.logo.txt &&     echo ""

   ██████  ██▓ ▄▄▄       ▄▄▄▄   
 ▒██    ▒ ▓██▒▒████▄    ▓█████▄ 
 ░ ▓██▄   ▒██▒▒██  ▀█▄  ▒██▒ ▄██
   ▒   ██▒░██░░██▄▄▄▄██ ▒██░█▀  
 ▒██████▒▒░██░ ▓█   ▓██▒░▓█  ▀█▓
 ▒ ▒▓▒ ▒ ░░▓   ▒▒   ▓▒█░░▒▓███▀▒
 ░ ░▒  ░ ░ ▒ ░  ▒   ▒▒ ░▒░▒   ░ 
 ░  ░  ░   ▒ ░  ░   ▒    ░    ░ 
       ░   ░        ░  ░ ░      
                              ░ 
 
=== Installing EPEL ===
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15080  100 15080    0     0  76298      0 --:--:-- --:--:-- --:--:-- 76548
warning: /tmp/epel.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ########################################
Updating / installing...
epel-release-7-11                     ########################################
\n=== Installing developer tools ===
/bin/sh: microdnf: command not found
subprocess exited with status 127
subprocess exited with status 127
error: build error: error building at STEP "RUN echo "" &&     cat /opt/siab.logo.txt &&     echo "=== Installing EPEL ===" &&     curl -o /tmp/epel.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm &&     rpm -ivh /tmp/epel.rpm &&     echo "\n=== Installing developer tools ===" &&     microdnf        --enablerepo=rhel-7-server-rpms        --enablerepo=rhel-7-server-extras-rpms        --enablerepo=rhel-7-server-optional-rpms        --enablerepo=rhel-7-server-ose-3.11-rpms        --enablerepo=rhel-7-server-devtools-rpms        --enablerepo=rhel-server-rhscl-7-rpms        --enablerepo=epel        install        jq vim screen which hostname passwd tmux nano wget git        bash-completion openssl shellinabox util-linux expect        atomic-openshift-clients     &&     microdnf clean all &&     cd /tmp &&     echo "\n=== Installing 'developer' user ===" &&     useradd -u 1001 developer -m &&     mkdir -pv /home/developer/bin /home/developer/tmp &&     echo "\n=== Bringing in nano's user config ===" &&     mv -v /tmp/nanorc /home/developer/.nanorc &&     echo "\n=== Giving nano's user config the correct ownership ===" &&     chown -R 1001:1001 /home/developer &&     echo "\n=== Setting the default password for our 'developer' user ===" &&     ( echo "developer" | passwd developer --stdin ) &&     echo "\n=== Randomizing root's password ===" &&     ( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1 | passwd root --stdin ) &&     echo "\n=== Removing login's lock file ===" &&     rm -f /var/run/nologin &&     echo "*** Done building siab container ***" &&     cat /opt/siab.logo.txt &&     echo """: exit status 127

What am I missing?

@ryran
Copy link
Author

ryran commented May 16, 2019

PS: I went down a whole rabbit-hole trying to get it to work by replacing registry.access.redhat.com with registry.redhat.io but I got even less far with that. Also tried to switch over to using the centos one but couldn't get that to work either. Why not just use centos/fedora for something like this? ...

@lpsantil
Copy link
Owner

lpsantil commented Oct 8, 2019

Sorry about the late response. It looks like you were hit by subscription-manager, repo issues, or recent changes to the rhel7-minimal image. There is a CentOS Dockerfile [0]. I'm planning on reworking/rebasing this around UBI7/8 soon. BTW, the goal is to enable a simple, lightweight, text mode development environment [1] like Eclipse Che that can be deployed on OpenShift, but a lot lighter. ocp-shellinabox containers are happy to run in 32MB or 64MB.

[0] https://github.com/lpsantil/ocp-shellinabox/blob/master/Dockerfile.centos7
[1] https://github.com/shellinabox/shellinabox/raw/master/misc/preview.gif?raw=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants