
Setting Up a Software Development Environment on Alpine Linux - quickthrower2
https://blog.overops.com/my-alpine-desktop-setting-up-a-software-development-environment-on-alpine-linux/
======
deathanatos
> _Ubuntu is 188 MB_

Ubuntu is 88MB:

    
    
      ubuntu  bionic  47b19964fb50  5 weeks ago  88.1MB
    

Definitely not Alpine levels of small, sure, but the size in the article is
off by a digit. But not _that_ big, either, and I find a huge number of devs
are more familiar with Ubuntu.

I'm also throwing Python into the container, so the base container size is
very quickly dwarfed by that. I think if you're using something like golang or
Rust, the gains would be a lot more meaningful.

~~~
saltyhitler
Not sure why the obsession with OS size. I don't mind having a 1GB OS that has
really good functionality vs a 50MB one that has none. I do want size to be a
factor for server based images which is a different beast altogether.

~~~
deathanatos
Bandwidth; we deploy frequently, and pushing images around is a fairly hefty
part of that deploy, and the less the better. OS images don't update _too_
often, thankfully, and Docker will only upload layers if needed, but it's
still much easier to push 5MB than 80-200MB, so Alpine does have a distinct
advantage there. 1GB is pushing it, a bit. (We also put much of our tooling on
the host VM; generally, this can suffice IME.)

While my office has a great connection, my ISP at home is less so,
particularly in the up direction. On mobile, pushing 80-200MB _up_ is
essentially not going to happen, both because it eats into my data caps
quickly, and because mobile latency is such that that's really slow.

~~~
saltyhitler
I agree and that's why I said server based images should be small but for user
based OSes, for development work or browsing, size should be the last thing on
the feature list. It's the development mindset that is pushing for small OS
sizes and we should put that in the backburner in exchange for a good user
experience.

------
vector_spaces
I have Alpine+gnome running on my little Dell Inspiron 5000 and I love it.
It's super snappy where even Lubuntu was sluggish.

There are some missing luxuries like obconf and Emacs gui, but I mainly use it
for browsing and sshing into Debian servers where I can just use vim anyway.

It was actually really straightforward to setup, too.

------
folkrav
Neat guide, but I really don't understand why you'd even want Alpine as a
daily driver, unless you're _really_ limited on performance.

~~~
saagarjha
Like emulating x86 on iOS[1], for example?

[1]: [https://github.com/tbodt/ish](https://github.com/tbodt/ish)

~~~
maxaf
Something about using the words “emulating x86 on iOS” and “daily driver”
together doesn’t sit right with me...

------
catern
It's quite ironic that the biggest usage of Alpine, a distro whose tagline is
"Alpine Linux is a security-oriented, lightweight Linux distribution based on
musl libc and busybox.", is Docker, which is an almost completely opposite
technology: vastly overcomplicated, insecure, and bloated. I'd be interested
to hear what the Alpine maintainers think of their biggest user...

~~~
raesene9
out of curiousity, where you say Docker is "insecure" what specific aspects of
Docker were you thinking of?

~~~
lojack
The docker daemon runs as a privileged user, so if you're able to break out of
the container (which has been shown possible recently) then you can compromise
the entire host OS.

~~~
hjk05
Could you provide a reference for how to break our?

~~~
lojack
[https://www.twistlock.com/labs-blog/breaking-docker-via-
runc...](https://www.twistlock.com/labs-blog/breaking-docker-via-runc-
explaining-cve-2019-5736/)

This is from a CVE that was released a little over a month ago.

~~~
raesene9
That was a runc vuln, which affected other conatinerization solutions on
Linux, not just docker.

Also it didn't really have anything to do with the Docker daemon running as
root, it was triggered by the use of root users in containers (blocked if the
user didn't do that, had decent SELinux setups or used user namespaces)

------
mbell
Is there a distro comparable to Alpine but based on glibc? I'm aware of
various workarounds / hacks for glibc support in Alpine, just curious if there
is a distro that doesn't have the issue out of the box.

~~~
Propolice
Void (Linux) has glibc and musl flavors.

------
Scarbutt
Regarding the Java notes in the article, the announcement of Java 12 today had
this:

"The Alpine Linux build previously available on this page was removed as of
JDK 12 GA. It’s not production-ready because it hasn’t been tested thoroughly
enough to be considered a GA build. Please use the early-access JDK 13 Alpine
Linux build in its place."

------
turtlegrids
This is thoroughly good stuff. Thanks to the author for the work they put into
this.

------
erikw
I like to set up mini dev environments in Alpine Docker containers when I'm
testing or trying out a new stack, and for the most part really like this
pattern. That said, I run into a lot of issues that I think are musl related.
The best part though is that when I finally get things working, everything is
documented nice and declaratively between the Dockerfile and the docker-
compose file, so I can come back to it later or clone it for a different
project and it just works.

~~~
sandov
Pardon my ignorance, but what's the nature of these musl-related issues? Is it
because some programs or libraries use glibc specific-features/bugs? Or is it
something else? Does glibc have their own non-standard functions?

~~~
tyingq
Pre built jvm binaries that are dynamically linked to glibc are an example.

 _" At present, some glibc-linked shared libraries can be loaded with musl,
but all but the simplest glibc-linked applications will fail if musl is
dropped-in in place of /lib/ld-linux.so.2"_

[https://www.musl-libc.org/faq.html](https://www.musl-libc.org/faq.html)

Some of the differences are listed here: [https://wiki.musl-
libc.org/functional-differences-from-glibc...](https://wiki.musl-
libc.org/functional-differences-from-glibc.html)

~~~
kristianp
That reminded me that I noticed from the java 12 link on the front page, that
they mention early access builds of java 13 for alpine.
[https://jdk.java.net/13/](https://jdk.java.net/13/)

------
a-nikolaev
Can anyone compare Alpine Linux with Void Linux, their pros and cons?

~~~
evil-olive
I don't claim to be an expert, but my understanding is that Alpine is mainly
focused on small size, so musl libc, lack of systemd, etc, are means to that
end.

Void seems to be more focused on power user experience, in the vein of Gentoo
/ Arch. So glibc or musl as an option, lack of systemd, and a pacman-like
package manager (xbps) are all means to that end.

Alpine gets lots of usage as a Docker base layer due to that small size. Void
certainly could be used as a Docker base image, but that's much less common
than Alpine because the image sizes are probably roughly comparable to Debian
and when running in a container the systemd vs not-systemd choice becomes less
relevant.

------
interfixus
Alpine is magic. No fluff, no bloat, simple really, really well-designed
setup- and package-tools. Including a full OS installation and setup, I can go
from blank machine (or vps) to functioning, customized server in less than ten
minutes if I absolutely have to. Good repos with everything I could ask for.
Oh, and OpenRC, no systemd nonsense. I need _really_ convincing reasons to
ever build a server on anything else.

------
aswanson
What does devops mean? I keep seeing that word.

~~~
peterwwillis
If you're a low-level employee, it means someone who hooks up Jenkins to other
crap. If you're a manager, it's a position you're hiring for. If you're upper
management or executive, it's a methodology to solve business problems and
improve output. If you're C-level, it's a cool buzz word.

~~~
quickthrower2
This is a cynical and funny comment, but I see from your profile you have a
wiki with a good definition that’s probably worth linking to
([https://devops.yoga/overview.html](https://devops.yoga/overview.html)).

~~~
hestefisk
C-suite porn.

~~~
peterwwillis
They'd never get off, there's no pie charts

------
peterwwillis
Can anyone explain what the deal is with companies who have 1000 general blog
posts, and then separately, a product they're selling? Is it just to bring in
traffic that will hopefully buy their product?

~~~
jbigelow76
Yes mostly, but it might also be considered a very roundabout evergreen
recruiting advertisement, "Oh look they are using X and Y to build Z! I bet
that would be a cool place to work if the opportunity arose."

------
morevasri
Slightly off-topic question: I use Windows as my OS of choice. If I want to
run my browser in a Linux VM via Virtualbox, would Alpine be a good choice?

Or is there something even better/lighter?

