To be clear on what I’m facing : I’ve just had an error when pushing changes, so :
- I’ve made clean clone in a new dir,
- I’ve added a “test.txt” file to be able to push,
- on pushing a Dockerfile and conf which lead to succesful build yesterday, it fails.
Here are the relevant part of my Dockerfile which fail
# Install Telegraf
&& wget -O /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_armhf.deb \
&& dpkg -i /tmp/telegraf.deb \
&& rm /tmp/telegraf.deb \
# We use systemd, not init.d services
&& rm -Rf /etc/init.d/telegraf \
&& cp /usr/lib/telegraf/scripts/telegraf.service /usr/lib/systemd/system/telegraf.service \
In build logs, I get :
[Build] Preparing to unpack /tmp/telegraf.deb ...
[Build] Unpacking telegraf (1.3.5-1) ...
[Build] Setting up telegraf (1.3.5-1) ...
[Build] invoke-rc.d: could not determine current runlevel
[Build] invoke-rc.d: policy-rc.d denied execution of restart.
[Build] cp: cannot create regular file '/usr/lib/systemd/system/telegraf.service': No such file or directory
[Build] Removing intermediate container 8daa276c206c
[Error]
So I guess if I was able to build with no cache, it would solve the problem, is it possible ?
UPDATE : after trying to deploy an almost empty Dockerfile to clear the cache, I’ve tried to build again and it failed again. So now, all my devices are empty and I can’t deploy my app.
When I run the instructions one by one on any device, it works. Could the reason be the /usr/lib/systemd/system directory is not existent at the moment of the copy ? (it did exist yesterday and the days before though).