/
Dockerfile_a3.3
39 lines (30 loc) · 1.41 KB
/
Dockerfile_a3.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM alpine:3.3
MAINTAINER Luis Fernando Gomes <dev@luiscoms.com.br>
ENV LIBEPP libepp-nicbr-1.15
ENV XERCES xerces-c-3.2.1
RUN apk add --no-cache gcc readline\
&& apk add --no-cache --virtual build-deps wget g++ make openssl-dev readline-dev
RUN cd /tmp/ \
&& wget --no-check-certificate https://archive.apache.org/dist/xerces/c/3/sources/$XERCES.zip\
&& wget --no-check-certificate https://archive.apache.org/dist/xerces/c/3/sources/$XERCES.zip.sha1\
&& sha1sum -c $XERCES.zip.sha1\
&& unzip $XERCES && cd $XERCES\
&& ./configure && make && make install\
&& wget ftp://ftp.registro.br/pub/libepp-nicbr/${LIBEPP}.tar.gz\
&& wget ftp://ftp.registro.br/pub/libepp-nicbr/${LIBEPP}.tar.gz.sha1\
&& sed -i.bak 's/.*(\(.*\)) = \(.*\)/\2 \1/' ${LIBEPP}.tar.gz.sha1\
&& sha1sum -c ${LIBEPP}.tar.gz.sha1\
&& tar xzvf ${LIBEPP}.tar.gz && cd ${LIBEPP}\
&& ./configure && make\
&& cd src/shepp && make && make install && cd -\
&& make install
RUN wget ftp://ftp.registro.br/pub/libepp-nicbr/test-certificates/client.pem\
&& wget ftp://ftp.registro.br/pub/libepp-nicbr/test-certificates/root.pem\
&& mv -f *.pem /usr/local/share/libepp_nicbr/ssl/
RUN apk del build-deps \
&& rm -rf /tmp/*
WORKDIR /libepp-nicbr
# test shepp installation
RUN echo -e "server beta.registro.br \nconnect\nexit" > commands && shepp -f commands
RUN [ $(shepp -f commands | grep greeting | wc -l) -gt 0 ] || exit 1 # fail connection
# CMD ['shepp']