Java 约10秒后从气流装卸容器上断开
我已成功创建并启动此容器:Java 约10秒后从气流装卸容器上断开,java,docker,dockerfile,airflow,Java,Docker,Dockerfile,Airflow,我已成功创建并启动此容器: User information: uid=0 euid=0 gid=0 egid=0 [2019-10-31 12:07:40,312] {{settings.py:213}} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=1 /usr/local/lib/python3.7/site-packag
User information: uid=0 euid=0 gid=0 egid=0
[2019-10-31 12:07:40,312] {{settings.py:213}} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=1
/usr/local/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
[2019-10-31 12:07:40,621] {{__init__.py:51}} INFO - Using executor CeleryExecutor
Running a worker with superuser privileges when the
worker accepts messages serialized with pickle is a very bad idea!
If you really want to continue then you have to set the C_FORCE_ROOT
environment variable (but please think about this before you do).
User information: uid=0 euid=0 gid=0 egid=0
通过运行:
docker build --rm --build-arg AIRFLOW_DEPS="datadog,dask" --build-arg PYTHON_DEPS="flask_oauthlib>=0.9" -t puckel/docker-airflow .
docker-compose -f docker-compose-CeleryExecutor.yml up -d
然后我只想将java添加到图像中:
我在最后补充说:
在建造和运行容器之后,
我正在尝试像安装java之前那样连接:
docker exec-it docker-worker\u 1/bin/bash
但是我自动断开了。安装了java
root@5475d28fb5f5:/usr/local/airflow# java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-8u232-b09-1~deb9u1-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
root@5475d28fb5f5:/usr/local/airflow# %
当我记录容器时:
User information: uid=0 euid=0 gid=0 egid=0
[2019-10-31 12:07:40,312] {{settings.py:213}} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=1
/usr/local/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
[2019-10-31 12:07:40,621] {{__init__.py:51}} INFO - Using executor CeleryExecutor
Running a worker with superuser privileges when the
worker accepts messages serialized with pickle is a very bad idea!
If you really want to continue then you have to set the C_FORCE_ROOT
environment variable (but please think about this before you do).
User information: uid=0 euid=0 gid=0 egid=0
用户信息:uid=0 euid=0 gid=0 egid=0
[2019-10-31 12:07:40312]{{settings.py:213}}INFO-settings.configure_orm():使用池设置。池大小=5,最大溢出=10,池回收=1800,pid=1
/usr/local/lib/python3.7/site-packages/psycopg2/__-init__;.py:144:UserWarning:psycopg2-wheel-packages将从2.8版重命名;为了保持从二进制文件安装,请改用“pip安装psycopg2二进制文件”。有关详细信息,请参阅:。
""")
[2019-10-3112:07:40621]{{{{uuuu init_uuuuuuuuuuuuuuuuuuuy.py:51}}信息-使用executor CeleryExecutor
当
工人接受用pickle序列化的消息是一个非常糟糕的主意!
如果您真的想继续,那么必须设置C_FORCE_根
环境变量(但请在执行之前考虑这一点)。
用户信息:uid=0 euid=0 gid=0 egid=0
有人能帮忙吗
谢谢所以您已将用户更改为Dockerfile中的root用户,而Airflow现在拒绝启动。请尝试将Dockerfile中的新代码移动到
用户Airflow
行之前。此外,您还可以在该行之后删除用户root
行