[英]run glue container locally using docker-compose
I would like to run REPL shell (Pyspark)
from the glue container using this command $ docker run -it -v ~/.aws:/home/glue_user/.aws -e AWS_PROFILE=$PROFILE_NAME -e DISABLE_SSL=true --rm -p 4040:4040 -p 18080:18080 --name glue_pyspark amazon/aws-glue-libs:glue_libs_3.0.0_image_01 pyspark
mentioned in pyspark-glue-container but instead of running as docker run
I would like to run as docker-compose
.我想使用此命令从胶水容器运行REPL shell (Pyspark)
$ docker run -it -v ~/.aws:/home/glue_user/.aws -e AWS_PROFILE=$PROFILE_NAME -e DISABLE_SSL=true --rm -p 4040:4040 -p 18080:18080 --name glue_pyspark amazon/aws-glue-libs:glue_libs_3.0.0_image_01 pyspark
在pyspark-glue-container中提到但不是以docker run
我想以docker-compose
运行Hence created below compose file:因此在下面创建了 compose 文件:
container_name: "glue_container"
image: amazon/aws-glue-libs:glue_libs_2.0.0_image_01
environment:
DISABLE_SSL: "true"
ports:
- 4040:40404
- 18080:18080
command: pyspark
volumes:
- ${PWD}/local_path_to_workspace:/home/glue_user/workspace/
but I'm not able to get the glue pyspark shell up and running?但我无法启动并运行胶水 pyspark shell? but the container is exiting with an error.但容器正在退出并出现错误。
I'm guessing you got a "volume must be a mapping" error我猜你遇到了“volume must be a mapping”错误
Try this format试试这个格式
services:
pyspark_repl:
image: amazon/aws-glue-libs:glue_libs_2.0.0_image_01
environment:
DISABLE_SSL: "true"
ports:
- 4040:40404
- 18080:18080
command: pyspark
volumes:
- ${PWD}:/home/glue_user/workspace/
Then run it like this然后像这样运行
docker-compose run --rm pyspark_repl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.