File: Dockerfile

package info (click to toggle)
crispy-doom 7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,972 kB
  • sloc: ansic: 254,242; makefile: 986; objc: 951; python: 722; sh: 90; xml: 7
file content (39 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM ubuntu

######### Apt dependencies

ARG system_apt_dependencies="build-essential gdb automake autoconf libtool git pkg-config python3 python3-pip sudo"
ARG choco_apt_dependencies="gcc make libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev"
ARG choco_apt_dependencies_optional="libflac-dev libfluidsynth-dev libpng-dev libsamplerate-dev libvorbis-dev"
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -qq $system_apt_dependencies $choco_apt_dependencies $choco_apt_dependencies_optional

########## Install Pillow (PIL) via pip, not apt

ARG choco_pip_dependencies="pillow"
RUN pip install $choco_pip_dependencies

########## Container user setup

ARG USERNAME=chocodev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
    && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME

# Add sudo support
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
    && chmod 0440 /etc/sudoers.d/$USERNAME

# Add the user to the audio group, to have ALSA sound access
# TODO: pulseaudio, so this isn't necessary?
RUN addgroup $USERNAME audio

# Use bash, not sh. Yuck.
RUN chsh $USERNAME -s /bin/bash

USER $USERNAME

# Make sure we actually own our own local share stuff
RUN mkdir -p /home/$USERNAME/.local/share && \
    chown -R $USERNAME:$USERNAME /home/$USERNAME/.local