Open parched opened 3 years ago
Could you please provide a bit more details about gitpod and how it's configured for you?
Gitpod is a cloud IDE which gives you a shell in a docker instance. You can specify the Dockerfile, e.g., I'm trying this one. The user it gives you is not the root user, but gitpod
.
You can try it here if you like http://gitpod.io/#https://github.com/parched/strain-gauge/commit/cfde495f0160ca4a3e533373cd2b1b3acb78e66f
I think it's a question for the GitPod folks. If you can use a custom Dockerfile then you probably can try the following one:
FROM cirrusci/flutter:stable
USER gitpod
RUN chmod -R a+w $FLUTTER_HOME
🤷
I have a similar issue. I am trying to use this image with dagger.io.
It works well if I run my commands as root, but I get a warning from flutter saying that I shouldn't
Running it as a different user doesn't work
I got the same error around the lockfile, if I remove it I get
Flutter failed to check for directory existence at "/root/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-31.0.0/lib/".
instead
Maybe I shouldn't use this image, but wanted to let it be known at least
I have the same mistake when I launch pipeline not from root
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportStagingRelease'.
> Failed to install the following SDK components:
build-tools;30.0.3 Android SDK Build-Tools 30.0.3
tools Android SDK Tools
emulator Android Emulator
platforms;android-34 Android SDK Platform 34
The SDK directory is not writable (/opt/android-sdk-linux)
If I can suggest a different image, I created a repo for Flutter images that uses non-root use by default. It was also to solve other issues like preaching Android SDK, etc. After trying many existing images like this repository and others, I couldn't find one to fit my needs. @8thgencore, give it a try if you can. It would be nice if some of the things I did could be contributed to this repo, but I wanted to try a different approach, so I created a separate repo.
I just added
RUN chmod -R a+w $FLUTTER_HOME
to fix it, but I'm not sure if there is a better solution.
I'm using the following approach:
RUN chown -R $MY_USER:$MY_USER $FLUTTER_HOME
I'm trying to use this in gitpod, where there is a non-root user, but it fails with
I just added
to fix it, but I'm not sure if there is a better solution.