add other OS for docker

This commit is contained in:
Sukchan Lee 2018-02-21 23:20:48 +09:00
parent f5582c97b5
commit c8a65b6b18
19 changed files with 157 additions and 17 deletions

View File

@ -19,16 +19,16 @@ Docker running example
$ TAG=artful docker-compose \
-f docker-compose.yml -f docker-compose.test.yml run test
* TODO - Development(centos:latest)
$ DIST=centos docker-compose build
$ DIST=centos docker-compose run dev
* Development(fedora:latest)
$ DIST=fedora docker-compose build
$ DIST=fedora docker-compose run dev
* TODO - Runtime(debian-jessie)
$ DIST=debian TAG=jessie docker-compose build
$ DIST=debian TAG=jessie docker-compose
-f docker-compose.yml -f docker-compose.run.yml run run
* All Test with All Environment(TODO)
* All Test with All Environment
$ ./check.sh
* Run WebUI
@ -45,9 +45,9 @@ export DEBFULLNAME='Sukchan Lee'
export DEBEMAIL='acetcom@gmail.com'
* Transfer GPG key
$ gpg --export-secret-keys --armor --output private.asc'
$ gpg --export-secret-keys --armor --output private.asc
$ gpg --import private.asc
$ gpg --export > public.asc'
$ gpg --export > public.asc
$ gpg --import public.asc
* Upload LaunchPad

View File

@ -5,13 +5,14 @@ FROM ${username}/${dist}-${tag}-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
WORKDIR /tmp
WORKDIR /root
COPY setup.sh /root
ARG USER=acetcom
ARG REPO=nextepc
ARG BRANCH=master
RUN git clone https://github.com/$USER/$REPO
ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /tmp/version.json
ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /root/nextepc-ver.json
RUN cd nextepc && \
git fetch && git checkout -f -B master origin/master && \
@ -21,5 +22,3 @@ RUN cd nextepc && \
--sysconfdir=/etc \
--localstatedir=/var && \
make -j `nproc` install
WORKDIR /root

View File

@ -0,0 +1,29 @@
ARG dist=centos
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN yum -y install \
autoconf \
libtool \
gcc \
flex \
bison \
git \
lksctp-tools-devel \
libidn-devel \
gnutls-devel \
libgcrypt-devel \
openssl-devel \
cyrus-sasl-devel \
libyaml-devel \
iproute
RUN yum -y install centos-release-scl && \
yum -y install devtoolset-7-gcc devtoolset-7-make
RUN scl enable devtoolset-7 bash
RUN yum -y install epel-release && \
yum -y install mongo-c-driver-devel

View File

@ -0,0 +1,20 @@
ARG dist=centos
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-build
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN yum -y install \
cscope \
vim \
sudo \
iputils \
net-tools
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}
WORKDIR /home/${username}

View File

@ -0,0 +1 @@
7

View File

@ -6,4 +6,7 @@ docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
TAG=artful docker-compose build
TAG=artful docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=fedora docker-compose build
DIST=fedora docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
docker rm $(docker ps -qa --no-trunc --filter "status=exited")

1
support/docker/debian Symbolic link
View File

@ -0,0 +1 @@
ubuntu/

View File

@ -24,8 +24,9 @@ services:
base:
build:
context: ./${DIST-ubuntu}/base
context: ./${DIST-ubuntu}/${TAG-latest}/base
args:
dist: ${DIST-ubuntu}
tag: ${TAG-latest}
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-base
command: /bin/bash -c "echo 'base' services"
@ -44,14 +45,15 @@ services:
dev:
build:
context: ./${DIST-ubuntu}/dev
context: ./${DIST-ubuntu}/${TAG-latest}/dev
args:
dist: ${DIST-ubuntu}
tag: ${TAG-latest}
username: ${USER}
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-dev
depends_on:
- mongodb
- base
- build
environment:
DB_URI: mongodb://mongodb/nextepc
cap_add:

View File

@ -0,0 +1,23 @@
ARG dist=fedora
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN dnf -y install \
autoconf \
libtool \
gcc \
flex \
bison \
git \
lksctp-tools-devel \
libidn-devel \
gnutls-devel \
libgcrypt-devel \
mongo-c-driver-devel \
openssl-devel \
cyrus-sasl-devel \
snappy-devel \
libyaml-devel \
iproute

View File

@ -0,0 +1,20 @@
ARG dist=fedora
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-build
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN dnf -y install \
cscope \
vim \
sudo \
iputils \
net-tools
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}
WORKDIR /home/${username}

View File

@ -0,0 +1 @@
27

View File

@ -0,0 +1 @@
xenial

View File

@ -0,0 +1 @@
trusty

View File

@ -0,0 +1 @@
xenial

View File

@ -0,0 +1,37 @@
ARG dist=ubuntu
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
autoconf \
automake \
libtool \
gcc \
flex \
bison \
git \
libsctp-dev \
libgnutls28-dev \
libgcrypt-dev \
libssl-dev \
libidn11-dev \
libyaml-dev \
build-essential \
iproute2 \
ca-certificates \
netbase \
curl \
pkg-config && \
apt-get clean
WORKDIR /root
RUN curl -SLO "https://github.com/mongodb/mongo-c-driver/releases/download/1.9.2/mongo-c-driver-1.9.2.tar.gz"; \
tar xzf mongo-c-driver-1.9.2.tar.gz; \
cd mongo-c-driver-1.9.2; \
./configure --disable-automatic-init-and-cleanup; \
make -j `nproc` install; \
ldconfig;

View File

@ -0,0 +1 @@
../xenial/dev

View File

@ -1,5 +1,6 @@
ARG dist=ubuntu
ARG tag=latest
FROM ubuntu:${tag}
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
@ -26,5 +27,3 @@ RUN apt-get update && \
netbase \
pkg-config && \
apt-get clean
COPY setup.sh /root

View File

@ -1,6 +1,7 @@
ARG dist=ubuntu
ARG tag=latest
ARG username=acetcom
FROM ${username}/ubuntu-${tag}-base
FROM ${username}/${dist}-${tag}-build
MAINTAINER Sukchan Lee <acetcom@gmail.com>