# dagster-cloud

Henri Blancke

03/15/2023, 5:29 PM
👋 I'm testing out serverless deployments with a custom docker base image and am running into the below error:
Copy code
{'__typename': 'PythonError', 'message': 'dagster_cloud.workspace.ecs.client.EcsServiceError: ECS service failed because task arn:aws:ecs:us-west-2:657821118200:task/serverless-agent-5cc3cfb8-00af-35b5-b5cc-36acbd602030-Cluster/77123d64bbb542b1afaee60283d9ef5e failed: Essential container in task exited\nTask logs:\nexec /usr/local/bin/dagster: exec format error\n', 'stack': ['  File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/", line 1203, in _reconcile\n    self._wait_for_new_server_ready(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 357, in _wait_for_new_server_ready\n    task_arn = self.client.wait_for_new_service(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 405, in wait_for_new_service\n    return self.check_service_has_running_task(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 517, in check_service_has_running_task\n    self._raise_failed_task(task, container_name, logger)\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 442, in _raise_failed_task\n    raise EcsServiceError(task_arn=task_arn, stopped_reason=stopped_reason, logs=logs)\n']}
after waiting for the agent to sync changes to dagster. Has anyone else run into this issue? I can share my dockerfile in the thread here.
Copy code
FROM python:3.8-slim

ENV HOME_DIR /opt/dagster/app

RUN mkdir -p /opt/dagster/dagster_home $HOME_DIR

RUN apt-get update && \
    apt-get install -y git make

COPY dagster ./dagster
RUN cd dagster && pip install ".[dev]" dagster-cloud[serverless]

COPY dbt ./dbt
COPY Makefile ./Makefile

RUN cd dbt && \
    dbt deps && \
    dbt ls --profiles-dir $HOME_DIR

CMD ["python"]
The idea is to have the CI build an image that can be used for some validation steps before deployment and reuse that image for the actual deployment


03/15/2023, 6:29 PM
Hi Henri - I took a stab at answering this in a discussion here since it comes up a fair amount: If it's like the others should be as simple as adding a --platform flag when building the image

Henri Blancke

03/15/2023, 7:38 PM
Ooh perfect! Thanks @daniel I'll give that a try