balena-os / resin-device-toolbox

[DEPRECATED] The official Resin Device Toolbox CLI for resinOS
Apache License 2.0
14 stars 3 forks source link

Unable to push an image (archive/tar: invalid tar header). #56

Open jason-riddle opened 7 years ago

jason-riddle commented 7 years ago

Following this guide: https://resinos.io/docs/raspberry-pi/gettingstarted/#creating-a-project-from-scratch, I'm unable to push my image to the Raspberry Pi. To reproduce, I did the following:

mkdir -p myapp && cd myapp && touch Dockerfile

My Dockerfile has the following.

# Dockerfile
FROM resin/raspberry-pi-alpine-node:slim
CMD [“cat”, “/etc/os-release”]

I then attempt to push.

rdt push --source .

(node:62716) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
Reporting discovered devices
? select a device resin.local (192.168.1.84)
? Select a name for the application myapp
* Building..
- Stopping and Removing any previous 'myapp' container
- Building new 'myapp' image
rdt push failed. Error: (HTTP code 500) server error - archive/tar: invalid tar header
  Error: (HTTP code 500) server error - archive/tar: invalid tar header

    at /usr/local/lib/node_modules/resin-device-toolbox/node_modules/docker-modem/lib/modem.js:229:17
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/resin-device-toolbox/node_modules/docker-modem/lib/modem.js:256:9)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

I have a Raspberry Pi 1 Model B and have the following node, npm, and rdt version.

$ node --version
v7.2.0
$ npm --version
3.10.9
$ rdt version
(node:88900) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
0.0.7
lekkas commented 7 years ago

Hey @jason-riddle ,

This looks like an issue with our documentation. Depending on your actual device, the correct Docker base image names should be:

Can you please try using one of the above images in the FROM Dockerfile instruction?

jason-riddle commented 7 years ago

Updated to use the correct name resin/raspberrypi-alpine-node:slim, but still no luck.

lekkas commented 7 years ago

@jason-riddle I'm now suspecting network issues. Can you please try