Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failing on new fresh clone #306

Closed
agnoam opened this issue Aug 10, 2024 · 0 comments · Fixed by #307
Closed

Docker build failing on new fresh clone #306

agnoam opened this issue Aug 10, 2024 · 0 comments · Fixed by #307

Comments

@agnoam
Copy link
Contributor

agnoam commented Aug 10, 2024

The docker image build is failing due to missing files in the repo.

Steps to reproduce:

  1. git clone https://github.com/OpenSprinkler/OpenSprinkler-Firmware
  2. following the steps in the repo's docker readme file

Exception dump:

$ docker build . -t opensprinkler

[+] Building 7.3s (17/27)                                                                                docker:default
 => [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 1.62kB                                                                             0.0s
 => [internal] load metadata for docker.io/library/debian:bookworm-slim                                            0.7s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
 => [base 1/1] FROM docker.io/library/debian:bookworm-slim@sha256:5f7d5664eae4a192c2d2d6cb67fc3f3c7891a8722cd2903  0.0s
 => [internal] load build context                                                                                  0.7s
 => => transferring context: 2.86MB                                                                                0.5s
 => CACHED [raspi-gpio-build 1/9] RUN apt-get update                                                               0.0s
 => CACHED [stage-3 1/7] RUN apt-get update && apt-get install -y libstdc++6 libmosquittopp1                       0.0s
 => CACHED [stage-3 2/7] RUN rm -rf /var/lib/apt/lists/*                                                           0.0s
 => CACHED [stage-3 3/7] RUN mkdir /OpenSprinkler                                                                  0.0s
 => CACHED [stage-3 4/7] RUN mkdir -p /data/logs                                                                   0.0s
 => CANCELED [raspi-gpio-build 2/9] RUN apt-get install -y git gcc make automake                                   6.0s
 => CACHED [os-build 1/6] RUN apt-get update && apt-get install -y bash g++ make libmosquittopp-dev libssl-dev     0.0s
 => CACHED [os-build 2/6] RUN rm -rf /var/lib/apt/lists/*                                                          0.0s
 => [os-build 3/6] COPY . /OpenSprinkler                                                                           1.4s
 => [os-build 4/6] WORKDIR /OpenSprinkler                                                                          0.5s
 => [os-build 5/6] RUN make clean                                                                                  1.3s
 => ERROR [os-build 6/6] RUN make VERSION=OSPI                                                                     1.7s
------
 > [os-build 6/6] RUN make VERSION=OSPI:
0.763 g++ -std=gnu++14 -DOSPI -DSMTP_OPENSSL -Wall -include string.h -Iexternal/TinyWebsockets/tiny_websockets_lib/include -Iexternal/OpenThings-Framework-Firmware-Library/   -c -o main.o main.cpp
1.318 In file included from main.cpp:27:
1.318 OpenSprinkler.h:65:18: fatal error: OpenThingsFramework.h: No such file or directory
1.318    65 |         #include "OpenThingsFramework.h"
1.318       |                  ^~~~~~~~~~~~~~~~~~~~~~~
1.318 compilation terminated.
1.330 make: *** [<builtin>: main.o] Error 1
------
Dockerfile:30
--------------------
  28 |     WORKDIR /OpenSprinkler
  29 |     RUN make clean
  30 | >>> RUN make VERSION=${BUILD_VERSION}
  31 |
  32 |     ########################################
--------------------
ERROR: failed to solve: process "/bin/sh -c make VERSION=${BUILD_VERSION}" did not complete successfully: exit code: 2

Quick fix:

Just make sure the submodules are included. you can use git submodule update --recursive --init.

@arfrie22 arfrie22 linked a pull request Aug 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant