Dockerfile error at: LINE 1: SELECT users.profile_image_url AS users_profile_image_url,


#1

I want to add oracle support on docker, so I build the docker image from source code, and changed image: redash/redash:latest to image: redash:latest in the docker-compose.production.yml
After do the two steps:
Run docker-compose -f docker-compose.production.yml run --rm server create_db to setup the database.
Run docker-compose -f docker-compose.production.yml up

I have this error:

server_1    | [2018-02-23 07:47:16,892][PID:9][ERROR][redash] Exception on /favicon.ico [GET]
server_1    | Traceback (most recent call last):
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
server_1    |     response = self.full_dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
server_1    |     rv = self.handle_user_exception(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
server_1    |     return original_handler(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
server_1    |     reraise(exc_type, exc_value, tb)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
server_1    |     rv = self.dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
server_1    |     return self.view_functions[rule.endpoint](**req.view_args)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 226, in decorated_view
server_1    |     elif not current_user.is_authenticated:
server_1    |   File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 343, in __getattr__
server_1    |     return getattr(self._get_current_object(), name)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 302, in _get_current_object
server_1    |     return self.__local()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 26, in <lambda>
server_1    |     current_user = LocalProxy(lambda: _get_user())
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 302, in _get_user
server_1    |     current_app.login_manager._load_user()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py", line 317, in _load_user
server_1    |     return self.reload_user()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py", line 279, in reload_user
server_1    |     user = self.user_callback(user_id)
server_1    |   File "/app/redash/authentication/__init__.py", line 42, in load_user
server_1    |     return models.User.get_by_id_and_org(user_id, org)
server_1    |   File "/app/redash/models.py", line 240, in get_by_id_and_org
server_1    |     return db.session.query(cls).filter(cls.id == object_id, cls.org == org).one()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2756, in one
server_1    |     ret = self.one_or_none()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2726, in one_or_none
server_1    |     ret = list(self)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2797, in __iter__
server_1    |     return self._execute_and_instances(context)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2820, in _execute_and_instances
server_1    |     result = conn.execute(querycontext.statement, self._params)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
server_1    |     return meth(self, multiparams, params)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
server_1    |     return connection._execute_clauseelement(self, multiparams, params)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
server_1    |     compiled_sql, distilled_params
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
server_1    |     context)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
server_1    |     exc_info
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
server_1    |     reraise(type(exception), exception, tb=exc_tb, cause=cause)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
server_1    |     context)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 469, in do_execute
server_1    |     cursor.execute(statement, parameters)
server_1    | ProgrammingError: (psycopg2.ProgrammingError) column users.profile_image_url does not exist
server_1    | LINE 1: SELECT users.profile_image_url AS users_profile_image_url, u...
server_1    |                ^
server_1    |  [SQL: 'SELECT users.profile_image_url AS users_profile_image_url, users.groups AS users_groups, users.updated_at AS users_updated_at, users.created_at AS users_created_at, users.id AS users_id, users.org_id AS users_org_id, users.name AS users_name, users.email AS users_email, users.password_hash AS users_password_hash, users.api_key AS users_api_key \nFROM users \nWHERE users.id = %(id_1)s AND %(param_1)s = users.org_id'] [parameters: {'id_1': u'1', 'param_1': 1}]

#2

After I run docker-compose rm, it’s ok now. But it can’t suport oracle yet.
I had added this:

FROM oraclelinux:7-slim

ADD oracle-instantclient*.rpm /tmp/

RUN  yum -y install /tmp/oracle-instantclient*.rpm && \
     rm -rf /var/cache/yum && \
     rm -f /tmp/oracle-instantclient*.rpm && \
     echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient12.2.conf && \
     ldconfig

ENV PATH=$PATH:/usr/lib/oracle/12.2/client64/bin

CMD ["sqlplus", "-v"]

in front of the Dockerfile, and put oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm under the redash source code folder, but not work.