File: Containerfile

package info (click to toggle)
receptor 1.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,772 kB
  • sloc: python: 1,643; makefile: 305; sh: 174
file content (53 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (2)
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
FROM quay.io/centos/centos:stream9

# Python options = [3.9, 3.11, 3.12]
ARG PYTHON_VERSION=3.12

ENV PATH=${PATH}:/usr/local/go/bin

RUN set -x \
    && echo 'fastestmirror=True' >> /etc/dnf/dnf.conf \
    && dnf update -y \
    # Receptor build tools
    && dnf install -y \
        findutils \
        git \
        iproute \
        make \
        openssl \
        wget  \
    # Install specific python version
    && dnf install -y \
        python${PYTHON_VERSION} \
    python${PYTHON_VERSION}-pip \
    && pip${PYTHON_VERSION} install virtualenv \
    # Install specific golang version
    && dnf install -y \
        golang \
    && dnf clean all

# --- ALL IMAGE MUST BE THE SAME UNTIL NOW ---

# Caching dependencies
WORKDIR /dependencies
ADD ./go.mod \
    ./go.sum \
    ../receptorctl/requirements/tests.txt \
    ../receptorctl/requirements/tests.in ./
RUN set -x \
    # Go
    && go get -u golang.org/x/lint/golint \
    && go get -d -v ./... \
    # Python
    && virtualenv -p python${PYTHON_VERSION} /opt/venv \
    && source /opt/venv/bin/activate \
    && pip${PYTHON_VERSION} install \
        --upgrade \
        -r tests.in \
        -c tests.txt

ADD ./tests/environments/container-builder/build-artifacts.sh /

RUN chmod +x /build-artifacts.sh

WORKDIR /