Open dhexnatheo opened 2 years ago
@FreddyAprilliant Thanks for sharing! :+1:
I'd recommend considering the Dockerfile
for building your packs as an infrastructure-as-code artifact, keep it in the repo so you can just do default docker build
anytime without specifying the CLI parameters:
Dockerfile
:
# list of packs to be installed
ARG PACKS="ansible"
FROM stackstorm/st2packs:builder AS builder
# custom dependencies
RUN apt update && apt install -y libkrb5-dev gcc python3-dev python-dev
RUN /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}
FROM stackstorm/st2packs:runtime
that'll technically do the same. Choose the approach suitable for situation.
After some diggin' around, i've found this issue and begin to suspect that there was some missing dependencies here. I was right,
libkrb5-dev gcc python3-dev python-dev
were missing.I did some simple, temporary workaround for this. What i did was add those missing dependencies directly into the builder Dockerfile using
sed
.sed -i "2i RUN apt update && apt install -y libkrb5-dev gcc python3-dev python-dev && rm -rf /var/lib/apt/lists/*" ./st2packs-image/Dockerfile
And then proceed to build the image as the docs says. Summary for everything i've did:
I hope this could help and if anyone has better idea/way feel free to add. I'd really appreciate it.