2
2
ARG BUILDPLATFORM=linux/amd64
3
3
FROM --platform=$BUILDPLATFORM python:3.9-alpine
4
4
5
-
6
-
7
- # Add rust binaries to PATH
8
- ENV PATH="$PATH:/root/.cargo/bin"
9
-
10
5
# Create code directory, output directory
11
6
RUN mkdir /container_preparation /output
12
7
@@ -19,22 +14,29 @@ COPY ./utils /container_preparation/utils
19
14
# Set workdir
20
15
WORKDIR /container_preparation
21
16
22
- # Install necessary packages, spire-agent and rust
17
+ # Install necessary packages
23
18
RUN apk add --no-cache \
24
- git=2.43.0 -r0 \
25
- curl=8.5 .0-r0 \
19
+ git=2.45.2 -r0 \
20
+ curl=8.11 .0-r2 \
26
21
jq=1.7.1-r0 \
27
22
build-base=0.5-r3 \
28
- libffi-dev=3.4.4-r3 && \
29
- 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 && \
30
- 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 && \
31
- ln -s /opt/spire/bin/spire-agent /usr/bin/spire-agent && \
32
- ln -s /opt/spire/bin/spire-server /usr/bin/spire-server && \
33
- rm -rf spire-1.9.0-linux-amd64-musl.tar.gz && \
34
- curl https://sh.rustup.rs -sSf -o rustup.sh ; chmod +x rustup.sh ; ./rustup.sh -y ; export PATH="$PATH" :/root/.cargo/bin && \
35
- pip install --no-cache-dir -r ./requirements.txt && \
36
- pip install --no-cache-dir git+https://github.com/HewlettPackard/py-spiffe.git@3640af9d6629c05e027f99010abc934cb74122a8 && \
37
- rm -r /root/.cargo /root/.rustup
23
+ libffi-dev=3.4.6-r0
24
+ # Install spire-agent
25
+ 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 && \
26
+ tar xvf spire-1.9.0-linux-amd64-musl.tar.gz && \
27
+ mv spire-1.9.0 /opt && \
28
+ mv /opt/spire-1.9.0 /opt/spire && \
29
+ ln -s /opt/spire/bin/spire-agent /usr/bin/spire-agent && \
30
+ ln -s /opt/spire/bin/spire-server /usr/bin/spire-server && \
31
+ rm -rf spire-1.9.0-linux-amd64-musl.tar.gz
32
+ # Install python things (and rust temporarily)
33
+ RUN curl https://sh.rustup.rs -sSf -o rustup.sh && \
34
+ chmod +x rustup.sh && \
35
+ ./rustup.sh -y && \
36
+ export PATH="$PATH:/root/.cargo/bin" && \
37
+ pip install --no-cache-dir -r ./requirements.txt && \
38
+ pip install --no-cache-dir git+https://github.com/HewlettPackard/py-spiffe.git@3640af9d6629c05e027f99010abc934cb74122a8 && \
39
+ rm -r /root/.cargo /root/.rustup
38
40
39
41
# Set entrypoint
40
42
ENTRYPOINT [ "./entrypoint.sh" ]
0 commit comments