Added docker/base as minimal clixon container and docker/system as full clixon system.
This commit is contained in:
parent
7e38dc57e3
commit
66d8573c00
23 changed files with 222 additions and 138 deletions
|
|
@ -31,34 +31,57 @@
|
|||
# ***** END LICENSE BLOCK *****
|
||||
#
|
||||
|
||||
FROM olofhagsand/clixon
|
||||
# This application could use the base image, but it does not at this point.
|
||||
#FROM olofhagsand/clixon
|
||||
FROM debian
|
||||
MAINTAINER Olof Hagsand <olof@hagsand.se>
|
||||
|
||||
# Clixon dependenies (not needed if build from base)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git make gcc flex bison \
|
||||
libfcgi-dev \
|
||||
libcurl4-openssl-dev
|
||||
|
||||
# Application-specific
|
||||
RUN apt-get update && apt-get install -y nginx
|
||||
RUN apt-get update && apt-get install -y procps curl # ps for debugging
|
||||
|
||||
# Test-specific
|
||||
RUN apt-get update && apt-get install -y sudo curl procps # for test scripts
|
||||
|
||||
# The example uses "clicon" group
|
||||
RUN groupadd clicon
|
||||
RUN usermod -a -G clicon www-data
|
||||
|
||||
# Create a directory to hold source-code, dependencies etc
|
||||
RUN mkdir /example
|
||||
WORKDIR /example
|
||||
RUN mkdir /clixon
|
||||
WORKDIR /clixon
|
||||
|
||||
# Clone clixon (again) since example application is there.
|
||||
# Replace this with your application
|
||||
RUN git clone https://github.com/clicon/clixon.git
|
||||
|
||||
# Build clixon
|
||||
WORKDIR /example/clixon
|
||||
# Clone and build cligen (not necessary if use base image)
|
||||
RUN git clone https://github.com/olofhagsand/cligen.git
|
||||
WORKDIR /clixon/cligen
|
||||
RUN ./configure
|
||||
WORKDIR /example/clixon/example
|
||||
RUN make
|
||||
RUN make install
|
||||
|
||||
# Copy Clixon from local dir
|
||||
RUN mkdir /clixon/clixon
|
||||
WORKDIR /clixon/clixon
|
||||
COPY clixon .
|
||||
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN make install-include
|
||||
|
||||
WORKDIR /clixon/clixon/example
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN install example.xml /usr/local/etc/clixon.xml
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
# Copy startscript
|
||||
WORKDIR /
|
||||
WORKDIR /clixon
|
||||
COPY startsystem.sh startsystem.sh
|
||||
RUN install startsystem.sh /usr/local/bin/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue