-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (55 loc) · 1.72 KB
/
Dockerfile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM alpine:3.14
ARG LIBP11_VERSION=0.4.11
ARG OPENSC_VERSION=0.21.0
LABEL maintainer="Carlos Remuzzi <carlosremuzzi@gmail.com>"
LABEL version=${OPENSC_VERSION}
WORKDIR /usr/src/build
RUN apk add --no-cache \
ccid \
openssl \
pcsc-lite \
pcsc-lite-dev \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
build-base \
curl \
gettext \
openssl-dev \
libtool \
m4 \
readline-dev \
zlib-dev \
&& curl -fsL https://github.com/OpenSC/OpenSC/releases/download/${OPENSC_VERSION}/opensc-${OPENSC_VERSION}.tar.gz -o opensc-${OPENSC_VERSION}.tar.gz \
&& tar -zxf opensc-${OPENSC_VERSION}.tar.gz \
&& rm opensc-${OPENSC_VERSION}.tar.gz \
&& cd opensc-${OPENSC_VERSION} \
&& ./bootstrap \
&& ./configure \
--host=x86_64-alpine-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--disable-man \
--enable-zlib \
--enable-readline \
--enable-openssl \
--enable-pcsc \
--enable-sm \
CC='gcc' \
&& make \
&& make install \
&& curl -fsL https://github.com/OpenSC/libp11/releases/download/libp11-${LIBP11_VERSION}/libp11-${LIBP11_VERSION}.tar.gz -o libp11-${LIBP11_VERSION}.tar.gz \
&& tar -zxf libp11-${LIBP11_VERSION}.tar.gz \
&& rm libp11-${LIBP11_VERSION}.tar.gz \
&& cd libp11-${LIBP11_VERSION} \
&& ./configure \
&& make \
&& make install \
&& apk del .build-deps \
&& rm -r /usr/src/build \
&& addgroup -g 1000 opensc \
&& adduser -u 1000 -G opensc -s /bin/sh -D opensc \
&& mkdir -p /run/pcscd \
&& chown -R nobody:nobody /run/pcscd
WORKDIR /
CMD ["pcscd","-f","-i"]