Dockerfile 1.14 KB
Newer Older
Nick Elsmore's avatar
Nick Elsmore committed
1 2 3 4 5 6 7 8 9 10 11 12 13
FROM debian:stretch

ARG PUID
ENV PUID=${PUID:-1000}

ARG PGID
ENV PGID=${PGID:-1000}

ENV ENTRYPOINT ${ENTRYPOINT:-/docker-entrypoint.sh}

RUN DEBIAN_FRONTEND=noninteractive \
	apt-get update \
	&& apt-get install -y -q \
14 15
	   sudo \
	   locales \
Nick Elsmore's avatar
Nick Elsmore committed
16
	   locales-all \
Nick Elsmore's avatar
Nick Elsmore committed
17 18 19 20 21 22 23 24 25 26
	   gnupg \
	   flex \
	   bison \
	   build-essential \
	   libssl-dev \
	   curl \
	   wget \
	   gcc-arm-linux-gnueabihf \
	   python \
	   bc \
Nick Elsmore's avatar
Nick Elsmore committed
27 28
	   kmod \
	   cpio \
Nick Elsmore's avatar
Nick Elsmore committed
29
	   multistrap \
30 31 32
	   apt-transport-https \
	   debian-keyring \
	   debian-archive-keyring \
Nick Elsmore's avatar
Nick Elsmore committed
33 34
	   libc6-dev-armhf-cross \
	   qemu-user-static \
35 36
	   f2fs-tools \
	   bar \
Nick Elsmore's avatar
Nick Elsmore committed
37 38
	&& apt-get clean

39
RUN locale-gen en_US.UTF-8
Nick Elsmore's avatar
Nick Elsmore committed
40 41
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
42

Nick Elsmore's avatar
Nick Elsmore committed
43 44 45 46 47 48 49 50 51 52
RUN groupadd -r docker -g ${PGID} \
    && useradd -u ${PUID} -r -g docker -d /home/docker docker \
    && mkdir /home/docker \
    && mkdir /home/docker/pyra-build \
    && chown -R docker.docker /home/docker \
    && echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers

COPY ./docker-entrypoint.sh /
RUN chmod a+x /docker-entrypoint.sh

53 54
RUN ln -s /home/docker/pyra-build/multistrap/pyra /usr/share/multistrap/pyra

Nick Elsmore's avatar
Nick Elsmore committed
55 56
USER docker
ENTRYPOINT ["/docker-entrypoint.sh"]