thingsboard-gateway icon indicating copy to clipboard operation
thingsboard-gateway copied to clipboard

[BUG] Failed to start locally build Docker image

Open devaskim opened this issue 3 years ago • 4 comments

Describe the bug I made this PR #913 and built Docker container to test

export GW_DOCKER_TAG=3.2 && \
docker build -t devaskim/tb-gateway:$GW_DOCKER_TAG docker/ && \
docker push devaskim/tb-gateway:$GW_DOCKER_TAG

Docker Compose configuration is official.

Here is what I got

admin-docker@test:~/gateway$ docker-compose up
[+] Running 1/0
 ⠿ Container gateway-tb-gateway-1  Recreated                                                                                                                                                                 0.1s
Attaching to gateway-tb-gateway-1
gateway-tb-gateway-1  | python: can't open file '//./thingsboard_gateway/tb_gateway.py': [Errno 2] No such file or directory
gateway-tb-gateway-1 exited with code 2
gateway-tb-gateway-1  | python: can't open file '//./thingsboard_gateway/tb_gateway.py': [Errno 2] No such file or directory
gateway-tb-gateway-1 exited with code 2

Versions (please complete the following information):

  • OS: [Ubuntu
  • Thingsboard IoT Gateway version 3.1

devaskim avatar Sep 10 '22 14:09 devaskim

Hi @devaskim, under the docker folder have to be all gateway files. зображення

samson0v avatar Sep 12 '22 07:09 samson0v

Thanks @samson0v Is it enough to move Dockerfile to root project directory instead of copying all files to docker subdirectory? It would be great to have corresponding documentation section to avoid extra questions.

devaskim avatar Sep 12 '22 07:09 devaskim

@devaskim, we will mention it in the documentation.

samson0v avatar Sep 12 '22 08:09 samson0v

Great, I suggest to close this ticket after docs will be added ;)

devaskim avatar Sep 12 '22 08:09 devaskim

Docs updated

samson0v avatar Nov 14 '22 11:11 samson0v

Using docker build . -f docker/Dockerfile will build success.

yosimasu avatar Mar 23 '23 06:03 yosimasu