-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (28 loc) · 1.08 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
# Using Python original Docker image
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM python:3.9-alpine
# Install necessary packages and spire-agent
RUN apk add --no-cache \
git=2.47.1-r0 \
curl=8.11.0-r2 \
build-base=0.5-r3 \
openssl=3.3.2-r4
# Install spire-agent
RUN curl -LsSf -o spire-1.9.0-linux-amd64-musl.tar.gz https://github.com/spiffe/spire/releases/download/v1.9.0/spire-1.9.0-linux-amd64-musl.tar.gz && \
tar xvf spire-1.9.0-linux-amd64-musl.tar.gz && \
mv spire-1.9.0 /opt && \
mv /opt/spire-1.9.0 /opt/spire && \
ln -s /opt/spire/bin/spire-agent /usr/bin/spire-agent && \
ln -s /opt/spire/bin/spire-server /usr/bin/spire-server && \
rm -rf spire-1.9.0-linux-amd64-musl.tar.gz
# Copy server
COPY ./server /server
# Set workdir
WORKDIR /server
# Install dependencies
RUN pip install --no-cache-dir -r ./requirements.txt && \
pip install --no-cache-dir git+https://github.com/HewlettPackard/py-spiffe.git@3640af9d6629c05e027f99010abc934cb74122a8
# Copy utils
COPY ./utils /server/utils
# Set entrypoint
ENTRYPOINT [ "./entrypoint.sh" ]