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

Fresh clone fails to build in Docker #9

Open
verdverm opened this issue Nov 19, 2021 · 2 comments
Open

Fresh clone fails to build in Docker #9

verdverm opened this issue Nov 19, 2021 · 2 comments

Comments

@verdverm
Copy link

Just cloned and ran the make_rpm_docker.sh script. It gave the following error

Step 4/5 : RUN gem install fpm
 ---> Running in 7c3fa8759a69
ERROR:  Error installing fpm:
        git requires Ruby version >= 2.3.

It had more errors afterwards because of this failure (while trying to copy the missing rpm out)

Might be worth adding set -euo pipefail to the bash scripts on the second line

@verdverm
Copy link
Author

@verdverm
Copy link
Author

Dockerfile

FROM centos:7

RUN yum install -y tar wget rpm which centos-release-scl
RUN yum install -y rh-ruby23 rh-ruby23-ruby-devel gcc make rpm-build rubygems
RUN scl enable rh-ruby23 'gem install fpm'

COPY gsiam.py gsiam.conf VERSION make_rpm.sh /

make_rpm.sh

#!/bin/bash
set -euo pipefail

source VERSION

scl enable rh-ruby23 "fpm -s dir -t rpm -n ${NAME} --version ${VERSION} -p ${NAME}-${VERSION}.rpm \
      gsiam.py=/usr/lib/yum-plugins/gsiam.py \
      gsiam.conf=/etc/yum/pluginconf.d/gsiam.conf"

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

1 participant