Can you detail how you are building? Having the snap and having docker are orthogonal situations for me.
But considering docker, by doing,
diff --git a/snap/build-snap.sh b/snap/build-snap.sh
index 8a73ab6..9b09623 100755
--- a/snap/build-snap.sh
+++ b/snap/build-snap.sh
@@ -1,2 +1,2 @@
-docker pull snapcore/snapcraft
-docker run -it -v "$PWD:$PWD" -w "$PWD" snapcore/snapcraft snapcraft
\ No newline at end of file
+docker pull snapcore/snapcraft:stable
+docker run -it -v "$PWD:$PWD" -w "$PWD" snapcore/snapcraft:stable snapcraft
I successfully built zaproxy, here’s a full video doing that from a fresh Digital Ocean instance using its pre-baked docker setup
If however you are using snapcraft, I do not suspect the title of this topic is what is affecting you and I would appreciate a new thread to not mix up the topics for other casual readers passing through
I’m building a snap because we want to release ZAP as a snap.
I’m using docker to build it because I use Fedora which is not supported for building snaps
Yes there are 2 different problems here.
Although you can build zaproxy with snapcraft:stable you cannot run it - it fails with ‘desktop-launch: not found’. Thats a known problem which appears to happen for both stable and beta docker containers. Thats why we need to use latest. If you use latest then the build fails as per this issue.
Any idea when the latest image will be rebuilt?
The snap version of snapcraft, that is installed with sudo snap install snapcraft --classic also does not have newest fix for permission denied yet.
I did not get snapcraft working in Docker, VirtualBox, etc. Only way to get it working for me was to install Xubuntu 16.04 64 desktop, and then install snapcraft from GitHub repo, so I did get Wekan snap package built and uploaded to snap store.
To remind myself later, I added wiki page for myself to:
Today I noticed new activity on this issue, so I hope snap build servers will be fixed:
For cleanbuild? That is true, 2.43.1 should have the fix, snapd was released a bit to quickly for us to sync that out.
Why don’t you docker pull snapcore/snapcraft:stable though? That dockerfile, as is, will miss out environment settings when building classic confined snaps.
I did try docker longer time ago, and it did not work for me. Also using virtualbox did not work for me.
I build wekan for strict confinement. Not classic.
When installing snapcraft, sudo snap install snapcraft --classic installs snapcraft command for building snap packages locally with command sudo snapcraft on my local desktop. It does run on my laptop bare metal, so command line option cleanbuild is not used. But that snap package version of snapcraft command is broken, so I installed snapcraft command from source, without any docker/virtualbox/lxc.
And as I stated above, the stable docker image does build the snap, but when you try to run the zaproxy snap it fails with ‘desktop-launch: not found’.
I’m not sure what else to suggest then, beyond coming across really arsey by suggesting completely changing your entire infrastructure to use snapcraft outside of a docker image (I appreciate that’s really not helpful )
Its a pain because it was working until this bug reared its head.
I dont want to change my desktop distro just to satisfy one tool, but I can ask someone else who uses ubuntu to generate the snap.
But I would have thought an option for people who dont use ubuntu would be worth supporting…
did you consider using the lxd snap for container builds instead of docker ? (not sure how well this setup works on other distros, but perhaps it would be worth a try)
I’ve used docker a fair amount but not used lxd at all, which is why I went for docker. I dont have a problem using lxd but it’ll probably take me a while to get up to speed with it.