Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR [12/29] RUN chown android:android /androidstudio-data #10

Open
efriel94 opened this issue Apr 11, 2023 · 4 comments
Open

ERROR [12/29] RUN chown android:android /androidstudio-data #10

efriel94 opened this issue Apr 11, 2023 · 4 comments

Comments

@efriel94
Copy link

Host system:

  • Ubuntu 20.04.6 LTS
  • Intel Core i5-9600K
  • 32GB RAM

Getting an error on running ./build.sh :

=> ERROR [12/29] RUN chown android:android /androidstudio-data                                                                                                                                               0.3s
------                                                                                                                                                                                                             
 > [12/29] RUN chown android:android /androidstudio-data:
#0 0.270 chown: cannot access '/androidstudio-data': No such file or directory
------
Dockerfile:28
--------------------
  26 |     
  27 |     VOLUME /androidstudio-data
  28 | >>> RUN chown $USER:$USER /androidstudio-data
  29 |     
  30 |     COPY provisioning/docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
--------------------
ERROR: failed to solve: process "/bin/sh -c chown $USER:$USER /androidstudio-data" did not complete successfully: exit code: 1
@efriel94
Copy link
Author

Same error when running docker image build .

@davideCremona
Copy link

same error here

drb@drb-nb-4:~/GIT/android-studio-docker$ ./build.sh 
[+] Building 177.6s (16/33)                                                     
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 2.27kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 52B                                           0.0s
 => [internal] load metadata for docker.io/library/ubuntu:18.04            1.8s
 => [ 1/29] FROM docker.io/library/ubuntu:18.04@sha256:14f1045816502e16fc  4.7s
 => => resolve docker.io/library/ubuntu:18.04@sha256:14f1045816502e16fcbf  0.0s
 => => sha256:ffa418d98d4c763f2cba0d3b37e741c3d8b20dc6b60267e 424B / 424B  0.0s
 => => sha256:97ba4bbc97fcec201c950799697650b5cd8e5de1503 2.30kB / 2.30kB  0.0s
 => => sha256:4e43cebf9258af1a3b1edd74432c71dcb190dea87 25.69MB / 25.69MB  4.0s
 => => sha256:14f1045816502e16fcbfc0b2a76747e9f5e40bc3899 1.33kB / 1.33kB  0.0s
 => => extracting sha256:4e43cebf9258af1a3b1edd74432c71dcb190dea879f69291  0.5s
 => [internal] load build context                                          0.0s
 => => transferring context: 3.34kB                                        0.0s
 => [ 2/29] RUN dpkg --add-architecture i386                               0.4s
 => [ 3/29] RUN apt-get update && apt-get install -y         build-esse  167.3s
 => [ 4/29] RUN groupadd -g 1000 -r android                                0.4s 
 => [ 5/29] RUN useradd -u 1000 -g 1000 --create-home -r android           0.4s 
 => [ 6/29] RUN adduser android libvirt                                    0.4s 
 => [ 7/29] RUN adduser android kvm                                        0.4s 
 => [ 8/29] RUN echo "android:android" | chpasswd                          0.3s 
 => [ 9/29] RUN echo "android ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90  0.3s 
 => [10/29] RUN usermod -aG sudo android                                   0.5s
 => [11/29] RUN usermod -aG plugdev android                                0.4s
 => ERROR [12/29] RUN chown android:android /androidstudio-data            0.3s
------
 > [12/29] RUN chown android:android /androidstudio-data:
#0 0.326 chown: cannot access '/androidstudio-data': No such file or directory
------
Dockerfile:28
--------------------
  26 |     
  27 |     VOLUME /androidstudio-data
  28 | >>> RUN chown $USER:$USER /androidstudio-data
  29 |     
  30 |     COPY provisioning/docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
--------------------
ERROR: failed to solve: process "/bin/sh -c chown $USER:$USER /androidstudio-data" did not complete successfully: exit code: 1

@szazs89
Copy link

szazs89 commented Aug 8, 2023

Does somebody know what's the purpose of the folder (volume) /androidstudio-data?
I have built the image without it and it seems to run fine (omitting the volume mapping, too)

@Deadolus
Copy link
Owner

Deadolus commented Nov 9, 2023

may be fixed via #15

@szazs89 androidstudio-data is used to save android ide stuff like jre, plugins, etc.
If you do not map it to the outside it will just simply be created inside the container.
Thus it will be harder to port your installation to e.g. a second user/host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants