You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could we use this project within our Dockerfile #2
@pascalandy not sure I'm understanding the use-case you need. You want to have an npm package that just triggers a pkg through docker and just builds a binary?, or create a docker image?
In the example I've provided you only need to have docker to create your new docker images, for what I understand seems like you want to run pkg in a container and then take the binary output and run it in your host, right?. If this is the case, then you need to be extremely careful about different runtimes as you might get unexpected errors while trying to do it.
If you build + package using docker all the way, you minimize these types of mistakes.
I just created and released the package dockerpkg to npmjs.
It's now as simple as running npm install --save-dev dockerpkg and add "prebuild": "dockerpkg" to the scripts object in package.json, as demonstrated in the update example.
On May 4, 2017 8:24 AM, "Pascal Andy" ***@***.***> wrote:
@marcosnils <https://github.com/marcosnils> Thanks for jumping in. I want
to create a docker image like you did in your post without installing pkg
locally.
About:
In the example I've provided you only need to have docker to create your
new docker images, for what I understand seems like you want to run pkg
Are you saying I don't need to have pkg installed locally ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABgV2hwJ5mDBAIBOhMD3-_2lgVGwLJa6ks5r2bVXgaJpZM4NQCZ0>
.
Activity
beeman commentedon May 3, 2017
Hi @pascalandy ,
If you run the following command in your project it should build a file called
app.bin:This is the file that you can run in your own container, which you can base on the Dockerfile of this example:
The idea behind this project is to separate building and running.
I think I'm going to create an npm package that you can use to easily run the builder.
I hope this make it a bit clearer :)
pascalandy commentedon May 3, 2017
Seems exactly like the way it should! I think this will be a killer for the docker community :)
If you want to enhance the example from @marcosnils (link above) that would be great :)
marcosnils commentedon May 3, 2017
NPM all the things!.
@pascalandy not sure I'm understanding the use-case you need. You want to have an npm package that just triggers a
pkgthrough docker and just builds a binary?, or create a docker image?In the example I've provided you only need to have docker to create your new docker images, for what I understand seems like you want to run
pkgin a container and then take the binary output and run it in your host, right?. If this is the case, then you need to be extremely careful about different runtimes as you might get unexpected errors while trying to do it.If you build + package using docker all the way, you minimize these types of mistakes.
beeman commentedon May 4, 2017
I just created and released the package dockerpkg to npmjs.
It's now as simple as running
npm install --save-dev dockerpkgand add"prebuild": "dockerpkg"to the scripts object in package.json, as demonstrated in the update example.pascalandy commentedon May 4, 2017
@marcosnils Thanks for jumping in. I want to create a docker image like you did in your post without installing pkg locally.
About:
Are you saying I don't need to have pkg installed locally ?
marcosnils commentedon May 4, 2017
pascalandy commentedon May 4, 2017
Got it. I guess something brake when I tested your example as I used Alpine + 17.04 CE
It's all clear now :)
beeman commentedon May 4, 2017
@marcosnils nice post, those multi-step Dockerfiles look very interesting. I will probably move the project to that once it's live.