summaryrefslogtreecommitdiff
path: root/packaging/docker-p11p-dev/Dockerfile
blob: dfc546f7e3ac81ed4d5fcd65651dcc6166a17ab7 (plain)
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
40
41
42
43
44
45
46
47
48
FROM debian:buster-slim

MAINTAINER <linus+p11p@sunet.se>

RUN apt-get update
RUN echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
RUN apt-get -yq upgrade

# debian extra
RUN apt-get -yq install apt-utils

# buld deps
RUN apt-get -yq install git

# softhsm2, for testing
RUN apt-get -yq install softhsm2

# p11p and rebar3 dependencies
# FIXME: remove unused
RUN apt-get -yq install erlang-asn1 erlang-base erlang-common-test erlang-crypto erlang-debugger erlang-dev erlang-dialyzer erlang-eunit erlang-inets erlang-os-mon erlang-public-key erlang-reltool erlang-runtime-tools erlang-ssl erlang-tools

# rebar3 dependencies
RUN apt-get -yq install erlang-parsetools

# rebar3, for building p11p-daemon
WORKDIR /usr/local/src
RUN git clone https://git.sunet.se/rebar3.git
WORKDIR /usr/local/src/rebar3
RUN ./bootstrap
RUN ./rebar3 local install
ENV PATH="${HOME}/.cache/rebar3/bin:${PATH}"

# p11-kit, for p11-kit-remote
RUN apt-get -yq install make
WORKDIR /usr/local/src
RUN git clone --branch p11p https://git.sunet.se/p11-kit.git
WORKDIR /usr/local/src/p11-kit
RUN ./configure --without-libtasn1
RUN make all check install

# p11p, for p11p-daemon
WORKDIR /usr/local/src
RUN git clone https://git.sunet.se/p11p.git
WORKDIR /usr/local/src/p11p/p11p-daemon
RUN make rel

WORKDIR /usr/local/src/p11p/p11p-daemon
CMD ["make", "shell"]