简体   繁体   English

使用 docker-compose 在本地运行胶水容器

[英]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 pysparkpyspark-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.

相关问题 使用 Docker 容器在本地开发 AWS Glue ETL 作业 - Issue developing AWS Glue ETL jobs locally using a Docker container 如何使用 docker-compose 将容器部署到谷歌云? - How to deploy container using docker-compose to google cloud? 将 docker-compose 部署到 Cloud Run 或 GCP? - Deploying docker-compose to Cloud Run OR GCP? 使用 Nginx 容器通过 docker-compose 代理到 Elastic Beanstalk 上的 React 容器:这是一种有效的方法吗? - Using an Nginx container to proxy to a React container on Elastic Beanstalk with docker-compose: is that a valid approach? 为什么 docker-compose 在本地工作而不在 amazon ecs 中工作? - Why docker-compose work locally and don't in amazon ecs? Docker-compose:如何使用相同的网络地址从容器和主机访问 Localstack 资源 - Docker-compose: How to access Localstack resources both from container and host, using same network address Docker 容器在本地运行但在 Cloud Run 上失败 - Docker container runs locally but fails on Cloud Run 如何在谷歌云运行上运行 docker-compose? - How to run docker-compose on google cloud run? 使用ECS运行docker-compose时在本地部署特定的docker服务 - Deploying specific docker services locally when running docker-compose with ECS 使用 CloudFormation 运行 Ec2 中存在的 docker-compose - Use CloudFormation to run a docker-compose present in an Ec2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM