dev: initial environment
fedora, centos and ubuntu * fewer layers * systemd-dev * basic pieces for building docker everytime * centos updates * better automated build
This commit is contained in:
parent
dd61e1eb1a
commit
57c47d0cdc
12 changed files with 288 additions and 0 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
all := \
|
||||
fedora \
|
||||
ubuntu
|
||||
|
||||
#centos
|
||||
|
||||
default: $(all)
|
||||
|
||||
|
||||
fedora:
|
||||
cd $@-dev && $(MAKE)
|
||||
|
||||
ubuntu:
|
||||
cd $@-dev && $(MAKE)
|
||||
|
||||
centos:
|
||||
cd $@-dev && $(MAKE)
|
||||
|
||||
.PHONY: fedora ubuntu centos
|
||||
|
||||
clean:
|
||||
for d in fedora ubuntu centos; do (cd $$d-dev && $(MAKE) clean); done
|
||||
|
32
centos-dev/Dockerfile.in
Normal file
32
centos-dev/Dockerfile.in
Normal file
|
@ -0,0 +1,32 @@
|
|||
FROM FROM_IMAGE
|
||||
ENV container docker
|
||||
RUN groupadd -g 990 docker && \
|
||||
yum -y swap -- remove fakesystemd -- install systemd systemd-libs && \
|
||||
yum erase -y vim-minimal &&\
|
||||
yum groupinstall -y "development tools" && \
|
||||
yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs \
|
||||
yum-utils \
|
||||
git mercurial bzr quilt \
|
||||
tig \
|
||||
golang \
|
||||
vim-enhanced \
|
||||
sudo \
|
||||
screen \
|
||||
libtool \
|
||||
gtk-doc \
|
||||
intltool \
|
||||
gperf \
|
||||
wget \
|
||||
libgcrypt-devel libcap-devel glib2-devel \
|
||||
glibc-static device-mapper-devel btrfs-progs-devel sqlite-devel \
|
||||
keychain \
|
||||
tito && \
|
||||
yum update -y && \
|
||||
yum clean all && \
|
||||
useradd -m -u 1000 -G wheel DEV_USER && \
|
||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers && \
|
||||
yum update -y
|
||||
USER DEV_USER
|
||||
ENV HOME /home/DEV_USER
|
||||
WORKDIR /home/DEV_USER
|
||||
CMD bash -l
|
26
centos-dev/Makefile
Normal file
26
centos-dev/Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
DOCKER ?= $(shell which docker)
|
||||
FROM_IMAGE ?= centos
|
||||
FROM_TAG ?= latest
|
||||
FROM := $(FROM_IMAGE):$(FROM_TAG)
|
||||
REGISTRY ?= docker.usersys
|
||||
NAME ?= $(REGISTRY)/$(USER)/$(FROM_IMAGE)-dev:$(FROM_TAG)
|
||||
|
||||
default: build
|
||||
|
||||
Dockerfile: Dockerfile.in
|
||||
m4 --define=DEV_USER=$(USER) --define=FROM_IMAGE=$(FROM) $< > $@
|
||||
|
||||
build: .build
|
||||
|
||||
.build: Dockerfile .pull
|
||||
$(DOCKER) build -t $(NAME) . && touch $@
|
||||
|
||||
pull: .pull
|
||||
|
||||
.pull:
|
||||
$(DOCKER) pull $(FROM) && touch $@
|
||||
|
||||
clean:
|
||||
rm -rf .build .pull Dockerfile *~
|
||||
|
1
centos-dev/from
Normal file
1
centos-dev/from
Normal file
|
@ -0,0 +1 @@
|
|||
centos
|
41
fedora-dev/Dockerfile.in
Normal file
41
fedora-dev/Dockerfile.in
Normal file
|
@ -0,0 +1,41 @@
|
|||
FROM FROM_IMAGE
|
||||
|
||||
RUN yum erase -y vim-minimal && \
|
||||
groupadd -g 990 docker && \
|
||||
yum groupinstall -y "development tools" && \
|
||||
yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs \
|
||||
yum-utils \
|
||||
git \
|
||||
golang \
|
||||
mercurial \
|
||||
bzr \
|
||||
vim-enhanced \
|
||||
quilt \
|
||||
fedora-packager \
|
||||
sudo \
|
||||
screen \
|
||||
libtool \
|
||||
gtk-doc \
|
||||
intltool \
|
||||
libgcrypt-devel \
|
||||
gperf \
|
||||
libcap-devel \
|
||||
wget \
|
||||
tig \
|
||||
glibc-static \
|
||||
device-mapper-devel \
|
||||
btrfs-progs-devel \
|
||||
sqlite-devel \
|
||||
glib2-devel \
|
||||
libmount-devel \
|
||||
dbus-devel \
|
||||
keychain \
|
||||
tito && \
|
||||
yum update -y && \
|
||||
yum clean all && \
|
||||
useradd -m -u 1000 -G wheel,mock DEV_USER && \
|
||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
||||
USER DEV_USER
|
||||
ENV HOME /home/DEV_USER
|
||||
WORKDIR /home/DEV_USER
|
||||
CMD bash -l
|
31
fedora-dev/Dockerfile.rawhide
Normal file
31
fedora-dev/Dockerfile.rawhide
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM fedora:rawhide
|
||||
|
||||
RUN yum erase -y vim-minimal &&\
|
||||
yum groupinstall -y "development tools" && \
|
||||
yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs \
|
||||
yum-utils \
|
||||
git \
|
||||
golang \
|
||||
mercurial \
|
||||
bzr \
|
||||
vim-enhanced \
|
||||
fedora-packager \
|
||||
sudo \
|
||||
screen \
|
||||
libtool \
|
||||
gtk-doc \
|
||||
intltool \
|
||||
libgcrypt-devel \
|
||||
gperf \
|
||||
libcap-devel \
|
||||
glib2-devel \
|
||||
keychain \
|
||||
tito && \
|
||||
yum update -y && \
|
||||
yum clean all && \
|
||||
useradd -m -u 1000 -G wheel,mock vbatts && \
|
||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
||||
USER vbatts
|
||||
ENV HOME /home/vbatts
|
||||
WORKDIR /home/vbatts
|
||||
CMD bash -l
|
28
fedora-dev/Makefile
Normal file
28
fedora-dev/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
DOCKER ?= $(shell which docker)
|
||||
FROM_IMAGE ?= fedora
|
||||
#FROM_TAG ?= 21
|
||||
FROM_TAG ?= latest
|
||||
FROM := $(FROM_IMAGE):$(FROM_TAG)
|
||||
REGISTRY ?= docker.usersys
|
||||
NAME ?= $(REGISTRY)/$(USER)/$(FROM_IMAGE)-dev:$(FROM_TAG)
|
||||
|
||||
default: build
|
||||
|
||||
Dockerfile: Dockerfile.in
|
||||
m4 --define=DEV_USER=$(USER) --define=FROM_IMAGE=$(FROM) $< > $@
|
||||
|
||||
build: .build
|
||||
|
||||
.build: Dockerfile .pull
|
||||
$(DOCKER) build -t $(NAME) . && touch $@
|
||||
|
||||
pull: .pull
|
||||
|
||||
.pull:
|
||||
$(DOCKER) pull $(FROM) && touch $@
|
||||
|
||||
clean:
|
||||
rm -rf .build .pull Dockerfile *~
|
||||
|
||||
|
44
gccgo/Dockerfile
Normal file
44
gccgo/Dockerfile
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM centos
|
||||
|
||||
RUN yum groupinstall -y "development tools" && yum install -y wget tar && yum clean all
|
||||
|
||||
ENV CFLAGS -O2 -fPIC
|
||||
ENV CXXFLAGS -O2 -fPIC
|
||||
|
||||
ENV GMPVERSION 6.0.0
|
||||
RUN wget https://ftp.gnu.org/gnu/gmp/gmp-${GMPVERSION}a.tar.bz2
|
||||
RUN tar xf gmp-${GMPVERSION}a.tar.bz2
|
||||
RUN cd gmp-${GMPVERSION} && ./configure --prefix=/usr --libdir=/usr/lib64
|
||||
RUN cd gmp-${GMPVERSION} && make
|
||||
RUN cd gmp-${GMPVERSION} && make install
|
||||
|
||||
ENV MPFRVERSION 3.1.2
|
||||
RUN wget http://www.mpfr.org/mpfr-current/mpfr-${MPFRVERSION}.tar.bz2
|
||||
RUN tar xf mpfr-${MPFRVERSION}.tar.bz2
|
||||
RUN cd mpfr-${MPFRVERSION} && ./configure --prefix=/usr --libdir=/usr/lib64
|
||||
RUN cd mpfr-${MPFRVERSION} && make
|
||||
RUN cd mpfr-${MPFRVERSION} && make install
|
||||
|
||||
ENV MPCVERSION 1.0.2
|
||||
RUN wget ftp://ftp.gnu.org/gnu/mpc/mpc-${MPCVERSION}.tar.gz
|
||||
RUN tar xf mpc-${MPCVERSION}.tar.gz
|
||||
RUN cd mpc-${MPCVERSION} && ./configure --prefix=/usr --libdir=/usr/lib64
|
||||
RUN cd mpc-${MPCVERSION} && make
|
||||
RUN cd mpc-${MPCVERSION} && make install
|
||||
|
||||
ENV GCCVERSION 4.9.2
|
||||
RUN wget http://mirrors.concertpass.com/gcc/releases/gcc-${GCCVERSION}/gcc-${GCCVERSION}.tar.bz2
|
||||
RUN tar xf gcc-${GCCVERSION}.tar.bz2
|
||||
RUN cd gcc-${GCCVERSION} && ./configure --prefix=/usr --libdir=/usr/lib64 --disable-bootstrap --program-suffix=49 --disable-multilib --enable-languages=c,c++,go
|
||||
RUN cd gcc-${GCCVERSION} && make -j4
|
||||
RUN cd gcc-${GCCVERSION} && make install
|
||||
RUN ln -sf /usr/bin/gccgo49 /usr/bin/gccgo
|
||||
|
||||
ENV GOVERSION 1.2.2
|
||||
RUN wget https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz
|
||||
RUN tar xf go${GOVERSION}.linux-amd64.tar.gz
|
||||
ENV GOROOT /go
|
||||
ENV PATH ${GOROOT}bin:${PATH}
|
||||
|
||||
CMD bash -l
|
||||
|
14
gccgo/Makefile
Normal file
14
gccgo/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
NAME := docker.usersys/$(USER)/gccgo
|
||||
DOCKER := $(shell which docker)
|
||||
|
||||
all: build
|
||||
|
||||
build: .build
|
||||
|
||||
.build: Dockerfile
|
||||
$(DOCKER) build -t $(NAME) . && touch $@
|
||||
|
||||
clean:
|
||||
rm -f .build $(wildcard *~)
|
||||
|
20
ubuntu-dev/Dockerfile.in
Normal file
20
ubuntu-dev/Dockerfile.in
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM FROM_IMAGE
|
||||
|
||||
RUN useradd -m -u 1000 -G sudo DEV_USER && \
|
||||
sed -ri 's/^(%sudo.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
git \
|
||||
golang \
|
||||
mercurial \
|
||||
bzr \
|
||||
vim \
|
||||
sudo \
|
||||
screen \
|
||||
python-tox \
|
||||
keychain && \
|
||||
apt-get dist-upgrade -y
|
||||
USER DEV_USER
|
||||
ENV HOME /home/DEV_USER
|
||||
WORKDIR /home/DEV_USER
|
||||
CMD bash -l
|
26
ubuntu-dev/Makefile
Normal file
26
ubuntu-dev/Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
DOCKER ?= $(shell which docker)
|
||||
FROM_IMAGE ?= ubuntu
|
||||
FROM_TAG ?= latest
|
||||
FROM := $(FROM_IMAGE):$(FROM_TAG)
|
||||
REGISTRY ?= docker.usersys
|
||||
NAME ?= $(REGISTRY)/$(USER)/$(FROM_IMAGE)-dev:$(FROM_TAG)
|
||||
|
||||
default: build
|
||||
|
||||
Dockerfile: Dockerfile.in
|
||||
m4 --define=DEV_USER=$(USER) --define=FROM_IMAGE=$(FROM) $< > $@
|
||||
|
||||
build: .build
|
||||
|
||||
.build: Dockerfile .pull
|
||||
$(DOCKER) build -t $(NAME) . && touch $@
|
||||
|
||||
pull: .pull
|
||||
|
||||
.pull:
|
||||
$(DOCKER) pull $(FROM) && touch $@
|
||||
|
||||
clean:
|
||||
rm -rf .build .pull Dockerfile *~
|
||||
|
1
ubuntu-dev/from
Normal file
1
ubuntu-dev/from
Normal file
|
@ -0,0 +1 @@
|
|||
ubuntu:14.04
|
Loading…
Reference in a new issue