-
Notifications
You must be signed in to change notification settings - Fork 60
/
Dockerfile
74 lines (59 loc) · 2.27 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
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM node:14
# Metadata params
ARG BUILD_DATE
ARG VCS_REF
ARG VCS_URL
ARG VERSION
ARG EXPOSE_HTTPS_PORT
# Define the Metadata Container image
# For more info refere to https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL org.opencontainers.image.authors="Michele D'Amico, [email protected]" \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.version=${VERSION} \
org.opencontainers.image.source=${VCS_URL} \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.url="https://github.com/italia/spid-saml-check" \
org.opencontainers.image.vendor="Developers Italia" \
org.opencontainers.image.licenses="EUPL-1.2" \
org.opencontainers.image.title="SPID SAML Check" \
org.opencontainers.image.description="SPID SAML Check è una suita applicativa che fornisce diversi strumenti ai Service Provider SPID, utili per ispezionare le request di autenticazione SAML inviate all'Identity Provider, verificare la correttezza del metadata e inviare response personalizzate al Service Provider." \
org.opencontainers.image.base.name="italia/spid-saml-check"
# Update and install utilities
RUN apt-get update && apt-get install -y \
wget \
curl \
unzip \
libxml2-utils \
libxml2-dev \
libxmlsec1-dev \
libxmlsec1-openssl \
libffi-dev \
xmlsec1 \
openssl \
python3 \
python3-pip \
libffi-dev \
python3-virtualenv \
build-essential \
python3-dev cargo
RUN pip3 install setuptools_rust cryptography
# Upgrade pip
RUN pip3 install --upgrade pip
# Install spid-sp-test
RUN pip3 install spid-sp-test --no-cache
# Set the working directory
WORKDIR /spid-saml-check
# Copy the current directory to /spid-validator
ADD . /spid-saml-check
# Create directory for tests data
RUN mkdir /spid-saml-check/data
ENV TZ=Europe/Rome
ENV NODE_HTTPS_PORT=${EXPOSE_HTTPS_PORT}
# Build validator
RUN cd /spid-saml-check/spid-validator && \
cd client && npm install --silent && cd .. && \
cd server && npm install --silent && cd .. && \
npm run build
# Ports exposed
EXPOSE ${EXPOSE_HTTPS_PORT}
ENTRYPOINT cd spid-validator && npm run start-prod