-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (36 loc) · 1.47 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
# Using Python original Docker image
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM python:3.9-alpine
# Create code directory, output directory
RUN mkdir /data_preparation /output
# Copy useful data from the project
COPY ./client/data_preparation /data_preparation
# Copy utils for SPIFFEID creation ...
COPY ./utils /data_preparation/utils
# Set workdir
WORKDIR /data_preparation
# Install necessary packages
RUN apk add --no-cache \
git=2.47.1-r0 \
curl=8.11.0-r2 \
jq=1.7.1-r0 \
build-base=0.5-r3 \
libffi-dev=3.4.6-r0
# 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
# Install python things (and rust temporarily)
RUN curl https://sh.rustup.rs -sSf -o rustup.sh && \
chmod +x rustup.sh && \
./rustup.sh -y && \
export PATH="$PATH:/root/.cargo/bin" && \
pip install --no-cache-dir -r ./requirements.txt && \
pip install --no-cache-dir git+https://github.com/HewlettPackard/py-spiffe.git@3640af9d6629c05e027f99010abc934cb74122a8 && \
rm -r /root/.cargo /root/.rustup
# Set entrypoint
ENTRYPOINT [ "./entrypoint.sh" ]