mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-24 15:06:42 +00:00
612d374fbe
Make the creation of docker images easier so that CTNG_UID/CTNG_GID have a default value if it's not explicitly specified when building. This will allow publishing of images on various package repositories (e.g. docker hub, gitlab containers). dmgr.sh can still be used to set the UID/GID to that of the current user when building a custom container. Signed-off-by: Chris Packham <judge.packham@gmail.com>
15 lines
753 B
Docker
15 lines
753 B
Docker
FROM alpine:3.8
|
|
ARG CTNG_UID=1000
|
|
ARG CTNG_GID=1000
|
|
RUN addgroup -g $CTNG_GID ctng
|
|
RUN adduser -D -h /home/ctng -G ctng -u $CTNG_UID -s /bin/bash ctng
|
|
# Activate community and testing repositories
|
|
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
|
|
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
|
|
RUN apk update
|
|
RUN apk add alpine-sdk wget xz git bash autoconf automake bison flex texinfo help2man gawk libtool ncurses-dev gettext-dev python-dev
|
|
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
|
|
RUN chmod a+x /sbin/dumb-init
|
|
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
|
|
ENTRYPOINT [ "/sbin/dumb-init", "--" ]
|