GithubHelp home page GithubHelp logo

Comments (6)

jpetazzo avatar jpetazzo commented on July 17, 2024

What error do you see?

Note that you will have other issues: you need a compiler to build make, and the busybox image doesn't have one...

from docker-busybox.

blankoworld avatar blankoworld commented on July 17, 2024

Here is the error:

tar: invalid tar magic

On the Internet I see that it could be probably linked to a "OLDGNU compatibility" (or something like that) flag to be activated before busybox compilation.
So I fetch the tar.gz file on a server, extract it, rebuild it, and fetch it on the docker busybox container. I can extract it and go to the second step. And yes, seems that it needs a compiler to build make, so I'm already stucked :(.

My initial need is to have a lightweight docker container that contains lua, lua-filesystem and lua-markdown. This is to avoid to make a 210Mb container for "just" 3 packages…
Seems too complicated for me.

from docker-busybox.

jpetazzo avatar jpetazzo commented on July 17, 2024

I would suggest to use a basic Debian base image (or another distro if you're more familiar with that).
Yes, the container will be bigger; but on those (e.g.) 210 MB, there will be 200 MB for the base layer, and 10 MB for the LUA layer, so it won't be too much of a big deal.

Unless you have a very specific scenario in mind?

from docker-busybox.

blankoworld avatar blankoworld commented on July 17, 2024

I developed a program that uses Lua (lua-filesystem and lua-markdown). To keep the sense of lightweight program I think about lightweight docker container.
I also be interested in busybox as base for many Dockerfile, but as I see it's complex to do so. I first see that someone create a lot of Docker container with some programming language. And when I read the Dockerfile, it just contains "FROM ubuntu" then "RUN apt-get install lua". It's curious for me and think about another way: busybox. But as you said it there is no gcc, GNU make, etc. in busybox which make it difficult to extend a busybox to a light linux core system.

So I follow your advice and use a Debian base image. Docker virtual size show 122Mb.
I'm now inquiring if it would be better to make 2 dockerfile:

  • the first one to make a debian + lua inside
  • the second one with my program

But that's another problem.

from docker-busybox.

jpetazzo avatar jpetazzo commented on July 17, 2024

OK. I will close this issue, but don't hesitate to let me know if you have further problems or questions related to the same topic!

from docker-busybox.

blankoworld avatar blankoworld commented on July 17, 2024

Ok, thanks for the help ;)

I found this: http://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/

If I got bravoure I will test this to have Lua compiled in a buildroot. But only for curiosity ^_^

from docker-busybox.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.