added Dockerfiles for building the travis environment

This commit is contained in:
Olaf Bergmann committed 2018-06-25 11:35:02 +02:00
1 parent df4bad7e08
commit 767a24ebfc
5 files changed
+65

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
imagename
build.sh
*~
.*.swp
\#*#
+6
View File
@@ -0,0 +1,6 @@
FROM debian:testing-slim
RUN apt-get update && apt-get install -y autoconf automake gcc clang \
libtool libtool-bin make pkg-config libcunit1-dev libssl-dev \
exuberant-ctags
RUN apt-get clean
+36
View File
@@ -0,0 +1,36 @@
FROM obgm/libcoap:build-env
RUN apt-get update && apt-get install -y cmake git g++
RUN apt-get clean
ENV libcoap_dir=/home/libcoap
ADD . $libcoap_dir
WORKDIR $libcoap_dir
RUN ./autogen.sh --clean && ./autogen.sh
RUN ./configure --disable-documentation --enable-tests --enable-examples --with-openssl && make install clean
WORKDIR /home
RUN git clone --depth 1 https://github.com/cabo/cn-cbor.git && cd cn-cbor && ./build.sh all install
# The image for development with libcoap
FROM debian:testing-slim
RUN apt-get update && apt-get install -y autoconf automake gcc g++ gdb libtool libtool-bin make \
pkg-config libssl-dev
RUN apt-get install -y iproute2 lsof net-tools inetutils-ping netcat-openbsd less vim
RUN apt-get clean
COPY --from=0 /usr/local/include/coap /usr/local/include/coap
COPY --from=0 /usr/local/lib /usr/local/lib
COPY --from=0 /usr/local/bin/coap-client /usr/local/bin/
COPY --from=0 /usr/local/include/cn-cbor /usr/local/include/cn-cbor
RUN echo "/usr/local/lib" >>/etc/ld.so.conf.d/usr_local.conf && ldconfig /usr/local/lib
ARG user=user
RUN adduser --disabled-password --gecos '' $user
RUN chown -R $user:$user /home/$user
WORKDIR /home/$user
USER $user
EXPOSE 5683 5684
+16
View File
@@ -0,0 +1,16 @@
#! /usr/bin/env bash
pushd $(dirname $0)
. ./imagename
# see https://stackoverflow.com/a/2924755 for switching boldface on/off
bold=$(tput bold)
normal=$(tput sgr0)
echo "${bold}**** Creating build-env image ****${normal}"
docker build -f Dockerfile.build-env -t $USER/$IMAGE:build-env .
echo "${bold}**** Creating develop image ****${normal}"
docker build -f Dockerfile.develop -t $USER/$IMAGE:develop ..
popd
+2
View File
@@ -0,0 +1,2 @@
USER=obgm
IMAGE=libcoap