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: 1 addition & 1 deletion Dockerfile--altlinux_10.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ FROM base2_with_python-${PYTHON_VERSION} AS final
RUN adduser test -G wheel

# It enables execution of "sudo service ssh start" without password
RUN echo "WHEEL_USERS ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "test ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers

ADD --chown=test:test . /home/test/testgres
WORKDIR /home/test/testgres
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile--altlinux_11.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ FROM base2_with_python-${PYTHON_VERSION} AS final
RUN adduser test -G wheel

# It enables execution of "sudo service ssh start" without password
RUN echo "WHEEL_USERS ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "test ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers

ADD --chown=test:test . /home/test/testgres
WORKDIR /home/test/testgres
Expand Down
18 changes: 8 additions & 10 deletions Dockerfile--ubuntu_24_04.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RUN apt install -y openssh-server
RUN apt install -y time
RUN apt install -y netcat-traditional

RUN apt install -y git

RUN apt update
RUN apt install -y postgresql-common

Expand All @@ -20,16 +22,9 @@ RUN bash /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
RUN install -d /usr/share/postgresql-common/pgdg
RUN curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc

# It does not work
# RUN sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

RUN apt update
RUN apt install -y postgresql-${PG_VERSION}

EXPOSE 22

RUN ssh-keygen -A

# --------------------------------------------- base2_with_python-3
FROM base1 AS base2_with_python-3
RUN apt install -y python3 python3-dev python3-venv libpq-dev build-essential
Expand All @@ -38,16 +33,19 @@ ENV PYTHON_BINARY=python3
# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} AS final

RUN apt install -y git
EXPOSE 22

RUN ssh-keygen -A

RUN adduser test
RUN chown postgres:postgres /var/run/postgresql
RUN chmod 775 /var/run/postgresql
RUN usermod -aG postgres test

# It enables execution of "sudo service ssh start" without password
#RUN echo "test ALL=NOPASSWD:/usr/sbin/service ssh start" >> /etc/sudoers
RUN echo "test ALL=NOPASSWD:ALL" >> /etc/sudoers
# RUN echo "test ALL=NOPASSWD:/usr/sbin/service ssh start" >> /etc/sudoers
# RUN echo "test ALL=NOPASSWD:ALL" >> /etc/sudoers
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

ADD --chown=test:test . /home/test/testgres
WORKDIR /home/test/testgres
Expand Down