Hi everybody, I don’t know if this is the right c...
# ask-community
g
Hi everybody, I don’t know if this is the right channel to ask these Kubernetes-related questions. Correct me if I am wrong. 1. I would like to build my own docker image based on one of the prefect images with a pip command installing some libraries like prefect-dbt on top it. Could you share anexample Dockerfile with correct ENTRYPOINT etc. with me, please? 2. Is it possible to feed the namespace parameter in which the pods will be created via the values.yaml file in the helm chart while deploying the prefect-worker in the Kubernetes cluster?
I am getting the following error with my current configuration
Copy code
➜  prefect-docorbit git:(main) ✗ kubectl logs -n prefect prefect-worker-84775bcc86-n24ms
exec /usr/bin/tini: exec format error
Copy code
# Use the specified base image
FROM prefecthq/prefect:3.1.4-python3.12-kubernetes

# Install the required dependencies
RUN pip install --no-cache-dir \
    prefect-dbt \
    prefect-github \
    prefect-gcp \
    prefect-sqlalchemy \
    "dbt-core>=1.8.0,<1.9.0" \
    "dbt-postgres>=1.8.0,<1.9.0" \
    "dbt-bigquery>=1.8.0,<1.9.0"

# Set the working directory
WORKDIR /opt/prefect

# Set the entrypoint to start the Prefect worker
ENTRYPOINT ["prefect", "worker", "start"]

# Set default command arguments (can be overridden at runtime)
CMD ["--pool", "kubernetes-pool-1"]
s
Hi, I think you can count on the original entrypoint and build from there. An example final command might be
/usr/bin/tini -g -- /opt/prefect/entrypoint.sh prefect worker start --with-healthcheck --pool pool-1
> exec /usr/bin/tini: exec format error Are you running this image on ARM architecture ?
g
Sorry for posting the same question in different channels. We resolved this question in another channel and the issue was due to building the image in my M1 mac for my cluster with a different architecture.
s
Ah I figured. You were building on ARM after all. Glad you got it working
prefect rocket 1