mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-02-14 16:17:49 +01:00
43 lines
946 B
Docker
43 lines
946 B
Docker
FROM debian:jessie
|
|
|
|
ENV HOME /home/user
|
|
RUN useradd --create-home --shell /bin/bash --home-dir $HOME user
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
bzip2 \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
gnupg \
|
|
python \
|
|
sudo \
|
|
tar \
|
|
xz-utils \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY version.txt /home/user/
|
|
|
|
RUN git config --global user.email "no-reply@coreos.com" \
|
|
&& git config --global user.name "CoreOS Build SDK" \
|
|
&& curl -sSL https://storage.googleapis.com/git-repo-downloads/repo -o /usr/local/bin/repo \
|
|
&& chmod a+x /usr/local/bin/repo \
|
|
&& mkdir -p $HOME/coreos \
|
|
&& ( \
|
|
cd $HOME/coreos \
|
|
&& repo init -u https://github.com/coreos/manifest.git \
|
|
&& repo sync \
|
|
) \
|
|
&& adduser user sudo \
|
|
&& passwd -d user \
|
|
&& ln -snvf /dev/true /sbin/modprobe \
|
|
&& echo "sudo rootfs.sh" > $HOME/.bash_history \
|
|
&& chown -R user:user $HOME
|
|
|
|
COPY rootfs.sh /usr/local/bin/
|
|
|
|
WORKDIR $HOME
|
|
USER user
|
|
|
|
CMD ["bash"]
|