-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
67 lines (63 loc) · 3.14 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
FROM twdps/circleci-base-image:alpine-8.1.0
LABEL org.opencontainers.image.title="circleci-python-builder" \
org.opencontainers.image.description="Alpine-based CircleCI executor image" \
org.opencontainers.image.documentation="https://github.com/ThoughtWorks-DPS/circleci-python-builder" \
org.opencontainers.image.source="https://github.com/ThoughtWorks-DPS/circleci-python-builder" \
org.opencontainers.image.url="https://github.com/ThoughtWorks-DPS/circleci-python-builder" \
org.opencontainers.image.vendor="ThoughtWorks, Inc." \
org.opencontainers.image.authors="nic.cheneweth@thoughtworks.com" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.created="CREATED" \
org.opencontainers.image.version="VERSION"
ENV CONFTEST_VERSION=0.53.0
ENV COSIGN_VERSION=2.2.4
ENV SYFT_VERSION=1.8.0
ENV ORAS_VERSION=1.2.0
# sudo since twdps circleci remote docker images set the USER=cirlceci
# hadolint ignore=DL3004
RUN sudo apk add --no-cache \
python3==3.12.3-r1 \
python3-dev==3.12.3-r1 \
nodejs-current==21.7.3-r0 \
npm==10.8.0-r0 \
libffi-dev==3.4.6-r0 && \
sudo rm /usr/lib/python3.12/EXTERNALLY-MANAGED && \
sudo python3 -m ensurepip && \
sudo rm -r /usr/lib/python*/ensurepip && \
sudo pip3 install --upgrade pip==24.1.1 && \
if [ ! -e /usr/bin/pip ]; then sudo ln -s /usr/bin/pip3 /usr/bin/pip ; fi && \
sudo ln -s /usr/bin/pydoc3 /usr/bin/pydoc && \
sudo pip install \
setuptools==70.2.0 \
awscli==1.33.20 \
setuptools_scm==8.1.0 \
hatch==1.12.0 \
moto==5.0.10 \
wheel==0.43.0 \
build==1.2.1 \
twine==5.1.1 \
pipenv==2024.0.1 \
pylint==3.2.5 \
pytest==8.2.2 \
pytest-cov==5.0.0 \
coverage==7.5.4 \
invoke==2.2.0 \
requests==2.32.3 \
jinja2==3.1.4 && \
sudo npm install -g \
snyk@1.1292.1 \
bats@1.11.0 && \
sudo bash -c "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /usr/local/bin/cc-test-reporter" && \
sudo chmod +x /usr/local/bin/cc-test-reporter && \
curl -LO https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz && \
tar xzf conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz && \
sudo mv conftest /usr/local/bin && rm ./* && \
curl -LO https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign-linux-amd64 && \
chmod +x cosign-linux-amd64 && sudo mv cosign-linux-amd64 /usr/local/bin/cosign && \
sudo bash -c "curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin v${SYFT_VERSION}" && \
curl -LO "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install && \
tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C oras-install/ && \
sudo mv oras-install/oras /usr/local/bin/ && \
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/
USER circleci