Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/package-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
python: "3"
- platform: "altlinux_11"
python: "3"
- platform: "astralinux_1_7"
python: "3"

steps:
- name: Prepare variables
Expand Down
66 changes: 66 additions & 0 deletions Dockerfile--astralinux_1_7.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
ARG PYTHON_VERSION

# --------------------------------------------- base1
FROM packpack/packpack:astra-1.7 AS base1

RUN apt update
RUN apt install -y sudo curl ca-certificates
RUN apt update
RUN apt install -y openssh-server
# RUN apt install -y time
# RUN apt install -y netcat-traditional

RUN apt install -y git

# RUN apt install -y mc
# RUN apt install -y nano

# --------------------------------------------- base2_with_python-3
FROM base1 AS base2_with_python-3
RUN apt install -y python3 python3-dev python3-venv
ENV PYTHON_VERSION=3

# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} AS final

EXPOSE 22

RUN ssh-keygen -A

RUN useradd -m test

# It enables execution of "sudo service ssh start" without password
# MY OLD:
# RUN sh -c "echo test ALL=NOPASSWD:ALL" >> /etc/sudoers
# AI:
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# THIS CMD IS NEEDED TO CONNECT THROUGH SSH WITHOUT PASSWORD
RUN sh -c "echo "test:*" | chpasswd -e"
RUN sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config

ADD . /home/test/testgres
RUN chown -R test /home/test/testgres
WORKDIR /home/test/testgres

ENV LANG=C.UTF-8

USER test

RUN chmod 700 ~/
RUN mkdir -p ~/.ssh
RUN chmod 700 ~/.ssh

ENTRYPOINT sh -c " \
set -eux; \
echo HELLO FROM ENTRYPOINT; \
echo HOME DIR IS [`realpath ~/`]; \
# sudo service ssh enable; \
sudo service ssh start; \
ssh-keyscan -H localhost >> ~/.ssh/known_hosts; \
ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts; \
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
chmod 600 ~/.ssh/authorized_keys; \
ls -la ~/.ssh/; \
TEST_FILTER=\"\" bash run_tests3.sh;"
1 change: 1 addition & 0 deletions run_tests3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rm -rf $VENV_PATH
python3 -m venv "${VENV_PATH}"
export VIRTUAL_ENV_DISABLE_PROMPT=1
source "${VENV_PATH}/bin/activate"
pip install --upgrade pip setuptools wheel
python3 -m pip install -r tests/requirements.txt

# run builtin tests
Expand Down