Minimal Dockerfile with habitat

If I want to build containers with a custom mix of habby things going on, what’s the closest thing to FROM scratch I could start a Dockerfile with and then run hab commands. Is there an officially maintained base image that just comes with the hab command and minimal else? I know there’s one for studios but that comes with busybox and some binlinks already

I’m not aware of a more minimal Dockerfile than the one that supports studios. Since the supervisor depends on busybox, you’re not going to be able to use habitat without that, so I don’t think it’s possible to get much more minimal.

I don’t know if I would call this officially supported since it’s not in our build pipeline (yet) but I did make this a few weeks ago: The dockerfile it’s referencing at the top is

Will that work for running services, @elliott-davis? I’m curious how it gets around including the supervisor’s dependencies.

No, it just has the hab binary. I don’ think @chris wanted the supervisor, just the static hab binary.

Oh, in that case, awesome! Thanks for sharing that.

@elliott-davis perfect! Could you push hab-base to dockerhub?

Yeah I’m AFK at the moment but I can push it up tomorrow.

1 Like

1 Like