Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgmartin/node-tar-dockerode-repro
Repro for tar-stream header issue 44
https://github.com/cgmartin/node-tar-dockerode-repro
Last synced: 13 days ago
JSON representation
Repro for tar-stream header issue 44
- Host: GitHub
- URL: https://github.com/cgmartin/node-tar-dockerode-repro
- Owner: cgmartin
- Created: 2015-11-18T23:31:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T23:31:19.000Z (about 9 years ago)
- Last Synced: 2023-03-12T04:11:51.812Z (almost 2 years ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Repro for tar-stream header issue
Re:
1. Ensure docker is running, with proper shell environment
1. clone repo
1. run `cd node-tar-dockerode-repo`
1. run `npm install` # Install dependencies
1. run `node test-dockerode.js` # This should complete successfully without any errors...
1. run `sudo chgrp -R 0 .` # Change files to use GID "0" ("wheel" on my system)
1. run `node test-dockerode.js`After last step, the output contains:
```
tar-fs { [Error: HTTP code is 500 which indicates error: server error - archive/tar: invalid tar header
] reason: 'server error', statusCode: 500, json: null }
```Where the "tar and fstream" implementation was successful.
```
$ node test-dockerode.js
{ socketPath: false,
host: '172.23.0.100',
port: '2376',
protocol: 'https' }
Using tar and fstream...
Using tar-fs (and tar-stream)...
tar-fs { [Error: HTTP code is 500 which indicates error: server error - archive/tar: invalid tar header
] reason: 'server error', statusCode: 500, json: null }
{"stream":"Step 1 : FROM node:0.10-slim\n"}
{"stream":" ---\u003e d69349794ebf\n"}
{"stream":"Step 2 : EXPOSE 8626\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 5a4c49fa3032\n"}
{"stream":"Step 3 : WORKDIR /app\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 21db157e8870\n"}
{"stream":"Step 4 : ENV NODE_ENV production\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 967486c7c0de\n"}
{"stream":"Step 5 : CMD node test-tarfile.js\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 50b674018d26\n"}
{"stream":"Step 6 : COPY package.json /app/\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e bdb60a892177\n"}
{"stream":"Step 7 : RUN npm install\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 684364df550e\n"}
{"stream":"Step 8 : COPY . /app\n"}
{"stream":" ---\u003e 811aad1ef1a2\n"}
{"stream":"Removing intermediate container 672d4172508d\n"}
{"stream":"Successfully built 811aad1ef1a2\n"}
```