Added android-studio image
This commit is contained in:
parent
544d49a013
commit
a778a977d8
5 changed files with 71 additions and 0 deletions
1
android-studio/.dockerignore
Normal file
1
android-studio/.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
archie
|
1
android-studio/.gitignore
vendored
Normal file
1
android-studio/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
archie/
|
44
android-studio/Dockerfile
Normal file
44
android-studio/Dockerfile
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM base/archlinux:2018.08.01
|
||||
|
||||
COPY ./packages /workdir/packages
|
||||
|
||||
WORKDIR /workdir
|
||||
|
||||
RUN pacman --noconfirm -Sy mate-icon-theme python-pip python2-pip ttf-fira-code ttf-fira-mono ttf-inconsolata xorg yarn git base-devel curl
|
||||
|
||||
RUN mkdir yay \
|
||||
&& cd yay \
|
||||
&& curl -L https://github.com/Jguer/yay/releases/download/v8.1101/yay_8.1101_x86_64.tar.gz > yay.tar.gz \
|
||||
&& tar --strip-components=1 -xvf yay.tar.gz \
|
||||
&& cp yay /usr/bin/yay \
|
||||
&& cd .. \
|
||||
&& rm -rf yay
|
||||
|
||||
RUN useradd -m archie \
|
||||
&& echo archie:CHANGEME | chpasswd \
|
||||
&& usermod -a -G wheel archie
|
||||
|
||||
RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel
|
||||
|
||||
USER archie
|
||||
|
||||
RUN yay --noconfirm -Sy android-studio
|
||||
|
||||
RUN yay --noconfirm -Sy direnv android-sdk-platform-tools
|
||||
|
||||
USER root
|
||||
|
||||
RUN pacman --noconfirm -Sy pulseaudio
|
||||
|
||||
COPY ./pulse-client.conf /etc/pulse/client.conf
|
||||
|
||||
RUN groupadd -g 46 plugdev \
|
||||
&& usermod -a -G plugdev archie
|
||||
|
||||
RUN rm /etc/sudoers.d/wheel
|
||||
|
||||
USER archie
|
||||
|
||||
ENV DISPLAY :0
|
||||
|
||||
CMD ["android-studio"]
|
9
android-studio/pulse-client.conf
Normal file
9
android-studio/pulse-client.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Connect to the host's server using the mounted UNIX socket
|
||||
default-server = unix:/run/user/1000/pulse/native
|
||||
|
||||
# Prevent a server running in the container
|
||||
autospawn = no
|
||||
daemon-binary = /bin/true
|
||||
|
||||
# Prevent the use of shared memory
|
||||
enable-shm = false
|
16
android-studio/start.sh
Executable file
16
android-studio/start.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
docker build -t empathicqubit/android-studio .
|
||||
XSOCK=/tmp/.X11-unix
|
||||
XAUTH=/tmp/.docker.xauth
|
||||
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
|
||||
docker run \
|
||||
--privileged \
|
||||
-it \
|
||||
-v /dev/bus/usb:/dev/bus/usb \
|
||||
-v /run/user/$(id -u)/pulse:/run/user/1000/pulse \
|
||||
-v /dev/kvm:/dev/kvm \
|
||||
-v $PWD/archie:/home/archie \
|
||||
-v $XSOCK:$XSOCK \
|
||||
-v $XAUTH:$XAUTH \
|
||||
-e XAUTHORITY=$XAUTH \
|
||||
-e DISPLAY=$DISPLAY \
|
||||
empathicqubit/android-studio
|
Loading…
Add table
Reference in a new issue