Git push resin error missing Dockerfile


#1

A newby question, when building a multicontainer resin app with a selfmade docker-compose.yml file:

version: ‘2’
services:
datacollector:
build: ./datacollector-edge

and in /datacollector-edge/ a newly made Dockerfile.template file, I get an error ‘cannot locate Dockerfile’ when building. I have tried several git add, git init, git reset commands but nothing works.

Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 903 bytes | 301.00 KiB/s, done.
Total 9 (delta 2), reused 0 (delta 0)

[Info] Starting build for s7monitoring, user gh_bas_prorail
[Info] Dashboard link: https://dashboard.resinstaging.io/apps/47936/devices
[Info] Building on x64_01
[Info] Pulling previous images for caching purposes…
[Success] Successfully pulled cache images
[Error] Some services failed to build:
[Error] Service: datacollector
[Error] Error: Cannot locate specified Dockerfile: Dockerfile
[Error] Not deploying release.

remote: error: hook declined to update refs/heads/master
To git.resinstaging.io:gh_bas_xxxxxx/s7monitoring.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to ‘gh_bas_prorail@git.resinstaging.io:gh_bas_xxxxxx/s7monitoring.git’

I think there is something wrong with the git structure because writing objects is only 9 files and I have 256 files total in this resin app. Could there be something wrong with indexing and how should I fix this?

Thank you, Bas


#4

Solved by uploading all files to github and clone from there.


#5

Hi,
adding & committing all the files that your app uses is required, since our docker image builder just clones the repository that you push. Uploading them to github isn’t needed though, but probably helped you check which files were committed. git status is what you need to check what’s committed and what’s not but I would also suggest using a git GUI client to make it easier to reason what’s committed and what’s not.