Dockerfile.alpine 1.32 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM alpine:edge

## INSTALL DEPENDENCIES
RUN apk update && \
    apk add --no-cache sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils ncurses-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev 

## CREATE SUDOER USER
RUN adduser -S -D -G root -h /home/titan -s /bin/bash titan && \
    echo "titan:titan" | chpasswd && \
    echo "titan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER titan

## SETUP .BASHRC TO SETUP HOSTS FILE AT THE BOOT TIME
RUN echo 'sudo sh -c "cp /etc/hosts /etc/append && (echo \"127.0.1.1  $HOSTNAME\"; cat /etc/append) > /etc/hosts"' >> /home/titan/.bashrc
RUN echo 'sh' >> /home/titan/.bashrc

## CLONE TITAN
WORKDIR /home/titan
Adam Knapp's avatar
Adam Knapp committed
19
RUN git clone https://gitlab.eclipse.org/eclipse/titan/titan.core.git
Elemer Lelik's avatar
Elemer Lelik committed
20
WORKDIR /home/titan/titan.core/
Adam Knapp's avatar
Adam Knapp committed
21
RUN git checkout tags/7.2.2
Elemer Lelik's avatar
Elemer Lelik committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

## SET UP ENV VARIABLES
ENV TTCN3_DIR=/home/titan/titan.core/Install
ENV PATH=$TTCN3_DIR/bin:$PATH \
    LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH

## SET FLAGS
#RUN echo 'ALPINE_LINUX := yes \n\
#          TTCN3_DIR := /home/titan/titan.core/Install \n\
#          XMLDIR := /usr \n\
#          OPENSSL_DIR := /usr \n\
#          JNI := no \n\
#          GEN_PDF := no' >> Makefile.personal
COPY Makefile.personal-alpine Makefile.personal

## BUILD TITAN
RUN make install

ENTRYPOINT /bin/bash