-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
45 lines (37 loc) · 1.02 KB
/
Dockerfile
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
40
41
42
43
44
45
#
# crosstool-NG Dockerfile
#
# https://github.com/walkerlee/dockerfile-crosstool-NG
#
# Pull base image.
FROM ubuntu:14.04
MAINTAINER Walker Lee <[email protected]>
# Install.
RUN \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y wget bash-completion subversion && \
apt-get install -y build-essential gperf bison flex texinfo gawk libtool automake libncurses5-dev libexpat1-dev python-dev && \
rm -rf /var/lib/apt/lists/*
# Install crosstool-NG.
RUN \
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.20.0.tar.bz2 && \
tar xf crosstool-ng-*.tar.* && \
cd crosstool-ng-* && \
./configure && \
make install && \
cp ct-ng.comp /etc/bash_completion.d/ && \
rm -rf ../crosstool-ng-*
# Set environment variables.
ENV USER crosstool-ng
ENV HOME /home/$USER
# Create new user
RUN \
useradd -m $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/$USER
# Define user name.
USER $USER
# Define working directory.
WORKDIR $HOME
# Define default command.
CMD ["bash"]