incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][build] Cannot build docker images

Open clement-igonet opened this issue 1 year ago • 7 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

My goal is to build DevLake docker images locally, to take advantage of very last changes in main, or to test my own changes.

  • As suggested in https://devlake.apache.org/docs/DeveloperManuals/DeveloperSetup/ , I copy env.example to .env

  • Then I launched docker compose -f docker-compose-dev.yml build

  • Here is the issue I'm facing:

 => [devlake debian-amd64 2/3] RUN apt-get update                                                                                                                                                                                6.8s
 => CANCELED [devlake base  2/10] RUN apt-get update &&     apt-get install -y python3-dev python3-pip tar curl libssh2-1 zlib1g libffi-dev default-libmysqlclient-dev libpq-dev tini &&     apt-get clean &&     rm -fr /usr/s  8.9s
 => CANCELED [devlake debian-amd64 3/3] RUN apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev                                                                                                                               2.4s
 => ERROR [devlake debian-arm64 2/3] RUN apt-get update                                                                                                                                                                          2.3s
 => CANCELED [devlake builder  2/14] RUN apt-get update                                                                                                                                                                          0.8s
------
 > [devlake debian-arm64 2/3] RUN apt-get update:
0.347 exec /bin/sh: exec format error
------
failed to solve: process "/bin/sh -c apt-get update" did not complete successfully: exit code: 1

A workaround is to remove all code specific to arm64 in Dockerfile

What do you expect to happen

Ability to build from docker compose build

How to reproduce

From a AMD64 arch:

cp env.example .env
docker compose -f docker-compose-dev.yml build

Anything else

No response

Version

main

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

clement-igonet avatar Jan 04 '24 08:01 clement-igonet

Hi @clement-igonet , don't you consider using the image we already have? https://github.com/apache/incubator-devlake/tags

abeizn avatar Jan 04 '24 08:01 abeizn

Not for using features only in main branch. Could be also a nice way to contribute to validation, or to dev and build in an environment close to production with docker (DevOps way to work, to avoid: "it works on my PC")

clement-igonet avatar Jan 04 '24 10:01 clement-igonet

We normally rely on Github Actions to build docker images for us, the Building by docker-compose is never actually maintained. You may take a look at the build.yml if you are interested to make it work.

klesh avatar Jan 05 '24 04:01 klesh

The same applies for me. I solved it by changing the Dockerfile, but that means that every single time I have to update DevLake I must do a manual merge of it.

@abeizn I'm customizing Devlake for our own "company" workflows and so on, so we can't really use the images provided

Marco-De-Stefani avatar Feb 10 '24 09:02 Marco-De-Stefani

@Marco-De-Stefani Interesting, care to share why you choose to customize?

klesh avatar Feb 18 '24 09:02 klesh

Hey @klesh, sure! At the beginning we wanted to customize how to recognize the deployment (with the trigger jobs, which for us was really important), then we started customizing some other metrics. One example might be using PagerDuty custom fields to understand the actual duration of the incident (we have a "impact start/end time" there, which is added manually depending on the actual impact of the incident). We also added the incident priority, which allowed us to distinguish between automated incidents and real ones

So, mainly, things that we though were adding value to the tool, but not something valid for every use case.

Marco-De-Stefani avatar Feb 18 '24 16:02 Marco-De-Stefani

@Marco-De-Stefani Thanks for sharing, it is valuable information.

klesh avatar Feb 19 '24 06:02 klesh

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Apr 20 '24 00:04 github-actions[bot]

This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.

github-actions[bot] avatar Apr 27 '24 00:04 github-actions[bot]