Changing conf files in Docker Image

Asked by Adil Rahman

Hello,

I was able to download docker and get it set up on CentOS 8, and then run the docker image file at graphiteapp/graphite-statsd . My data is appearing on the graphs, however I want to change the settings in the storage-schemas.conf and the storage-aggregation.conf files.

I tried to git clone the docker github at https://github.com/graphite-project/docker-graphite-statsd and edit the files in conf/opt/graphite/conf/

I then ran the following command in the directory where the Dockerfile is present:

sudo docker build . -t test:test

It begins to start creating the image, but eventually I run into this error that doesn't allow for the new image to be successfully created:

Executing busybox-1.31.1-r16.trigger
OK: 1039 MiB in 202 packages
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 1840k 100 1840k 0 0 11.5M 0 --:--:-- --:--:-- --:--:-- 11.5M
/bin/sh: /tmp/get-pip.py: Permission denied
The command '/bin/sh -c true && apk add --update alpine-sdk git pkgconfig wget go cairo-dev libffi-dev openldap-dev python3-dev rrdtool-dev jansson-dev librdkafka-dev mysql-dev postgresql-dev && curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py && $python_binary /tmp/get-pip.py && rm /tmp/get-pip.py && pip install virtualenv==16.7.10 && virtualenv -p $python_binary /opt/graphite && . /opt/graphite/bin/activate && pip install cairocffi==1.1.0 django==2.2.13 django-statsd-mozilla fadvise gunicorn==20.0.4 eventlet>=0.24.1 gevent>=1.4 msgpack==0.6.2 redis rrdtool python-ldap mysqlclient psycopg2 django-cockroachdb==2.2.*' returned a non-zero code: 126

I did not change any file names or file content of anything aside from the contents of storage-schemas.conf and storage-aggregation.conf, so I would expect the Dockerfile to be able to successfully create a new image that I could then run a container in Docker on with no problems.

Am I missing something? Please let me know if you need any more information. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Denis Zhdanov
Solved:
Last query:
Last reply:
Revision history for this message
Best Denis Zhdanov (deniszhdanov) said :
#1

I changed README to reflect latest changes. You need to provide mandatory `python_binary` build arg when building container. For some reason it didn't accept default in Dockerfile.

So, you need to run something like
sudo docker build . --build-arg python_binary=python3 -t test:test

Revision history for this message
Adil Rahman (rahmanan) said :
#2

Thanks Denis Zhdanov, that solved my question.