News for hackers. Stuff that matters.
Re:`COPY –chmod` reduced the size of my container image by 35% by AtNightWeCode on Saturday March 26, 2022 @03:02AM (#30809882)
I have quit using Alpine. It caused to many issues in production. For some workloads in GO for instance you can use Scratch directly. But slim and distroless are my preferred base images.
Re:`COPY –chmod` reduced the size of my container image by 35% by burnoutgal on Saturday March 26, 2022 @10:24AM (#30812052)
Personally I hate scratch images because once you lose busybox, you lose the ability to exec into containers. It's a great escape hatch for troubleshooting.
Re:`COPY –chmod` reduced the size of my container image by 35% by kevin_nisbet on Saturday March 26, 2022 @11:45AM (#30812860)
There are a few options that help here. With host access, I tend to just use nsenter most of the time to do different troubleshooting. It can be a bit of a pain doing network troubleshooting though since the resolv.conf will be different without the fs namespace.

And kubernetes has debug containers and the like now.

Re:`COPY –chmod` reduced the size of my container image by 35% by mt42or on Saturday March 26, 2022 @03:14AM (#30809932)
Yes we have experienced many issues with Alpine too. Ubuntu with 25MB compressed is ok.
Re:`COPY –chmod` reduced the size of my container image by 35% by hericium on Saturday March 26, 2022 @03:32AM (#30810009)
Until it's not. Well working deb/apt is replaced by some self-sabotage called snap before up-to-date packages land there.
Re:`COPY –chmod` reduced the size of my container image by 35% by paskozdilar on Saturday March 26, 2022 @05:22AM (#30810419)
Snap is horrible.

The software required for running a Snap Store instance is proprietary [0], and there are no free software implementations as far as I know. Also, the default client code hardcodes [1] Canonical snap store, so you have to patch and maintain your own version of snapd if you want to self-host.

Snapd also hardcodes auto-updates that are also impossible to turn off without patching and maintaining your own version of snapd / blocking the outgoing connections to Canonical servers, so snapd is also horrible for server environments. To top that, the developers have this "I know what's good for you, you don't" attitude [2] that so much reminds me of You Know Who.

[0] https://www.techrepublic.com/article/why-canonical-views-the...

[1] https://www.happyassassin.net/posts/2016/06/16/on-snappy-and...

[2] https://forum.snapcraft.io/t/disabling-automatic-refresh-for...

Re:`COPY –chmod` reduced the size of my container image by 35% by johnisgood on Saturday March 26, 2022 @09:45AM (#30811727)
Yep. I am trying my best to boycott Canonical and their closed source Snap which is akin to Apple Store or Play Store, but for desktop... for... LINUX. Goes against the philosophy in every way imaginable.
Re:`COPY –chmod` reduced the size of my container image by 35% by progforlyfe on Saturday March 26, 2022 @10:00AM (#30811832)
It's really sad especially given how Canonical introduced so many people to Linux through Ubuntu. I understand they need to monetize to survive but I wish it wasn't like this. I miss the "Ubuntu One" service, a simple Dropbox like alternative that you pay for. Completely optional and server side. Integrated into the UI.
Re:`COPY –chmod` reduced the size of my container image by 35% by paskozdilar on Saturday March 26, 2022 @12:03PM (#30813030)
That being said, I was wondering how many people actually find the Snap system and ecosystem useful. Reverse engineering snapd (which is licensed under GPLv3) and snap app format in order to create a compatible server would be a fun project.
Re:`COPY –chmod` reduced the size of my container image by 35% by dontcare007 on Saturday March 26, 2022 @08:33AM (#30811310)
So,another systemd in the making... how long until snap takes over dns resolution...
Re:`COPY –chmod` reduced the size of my container image by 35% by paskozdilar on Saturday March 26, 2022 @12:01PM (#30813009)
Say what you want about systemd, but it is still Free Software.
Re:`COPY –chmod` reduced the size of my container image by 35% by heavyset_go on Saturday March 26, 2022 @03:41AM (#30810035)
Are people actually using Snap in containers? It feels like a convenience feature for desktop users.
Re:`COPY –chmod` reduced the size of my container image by 35% by ZiiS on Saturday March 26, 2022 @04:15AM (#30810163)
They don't give you the choice. Applications are only avaliable as either a snap or an deb. With many you might want to containerise (ie Chromium for CI) being snaps. I dont belive they can work in unpriviledged docker containers.
Re:`COPY –chmod` reduced the size of my container image by 35% by shaicoleman on Saturday March 26, 2022 @09:42AM (#30811705)
There are Chromium debs for Ubuntu 20.04 available from the Linux Mint repo.

To get it Chromium under docker, I'm using the following params:

  --headless --no-sandbox --disable-gpu --window-size=1920,1080 --disable-dev-shm-usage
Re:`COPY –chmod` reduced the size of my container image by 35% by yunohn on Saturday March 26, 2022 @04:56AM (#30810324)
Which apps are you using via Docker, that are only available as a snap?
Re:`COPY –chmod` reduced the size of my container image by 35% by heavyset_go on Saturday March 26, 2022 @04:05PM (#30814902)
I understand that, it's just my impression with using Snap that it's used to ship desktop applications in a consistent way.
Re:`COPY –chmod` reduced the size of my container image by 35% by bigpod on Saturday March 26, 2022 @08:35AM (#30811316)
you cannot use snap inside a docker or any other OCI container, first of all snap is a containerised package as well so it doesnt make much sense but what is more important it requires SystemD and as far as i know if systemd isnt PID 1 snap deamon wont run and its CLI will output it cant run.
Re:`COPY –chmod` reduced the size of my container image by 35% by unmole on Saturday March 26, 2022 @05:20AM (#30810415)
> I have quit using Alpine.

As I said to the author of TFA a few days ago: Alpine delenda est.

Re:`COPY –chmod` reduced the size of my container image by 35% by Beltalowda on Saturday March 26, 2022 @04:08AM (#30810139)
What issues did you experience with Alpine and Go?
Re:`COPY –chmod` reduced the size of my container image by 35% by wereHamster on Saturday March 26, 2022 @07:04AM (#30810811)
What go build options are recommended to have go output a static binary (that can run inside a scratch image)?
Re:`COPY –chmod` reduced the size of my container image by 35% by onei on Saturday March 26, 2022 @08:30AM (#30811294)
If you're using plain Go, you get static binaries for free. If you're linking against so C library you might be out of luck. You can try setting CGO_ENABLED=0 in your environment, but I've had mixed success in practice.
Re:`COPY –chmod` reduced the size of my container image by 35% by throwaway894345 on Saturday March 26, 2022 @09:43AM (#30811717)
I’ve only had success with CGO_ENABLED. If you depend on a C library, then obviously it won’t work, but mercifully few ago programs depend on C libraries (not having straight C ABI compatibility is a real blessing since virtually none of the ecosystem depends on C and its jerry rigged build tooling).
Re:`COPY –chmod` reduced the size of my container image by 35% by wereHamster on Saturday March 26, 2022 @10:41AM (#30812242)
Well this is not what I'm seeing. I need to add -ldflags "-linkmode external -extldflags -static" to the go build command otherwise the binary doesn't run inside a scratch image.
Re:`COPY –chmod` reduced the size of my container image by 35% by dimitrios1 on Saturday March 26, 2022 @09:11AM (#30811513)
CGO_ENABLED=0 has always worked for me in production, but it did come with some tradeoffs, notably, network performance.