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
5 changes: 2 additions & 3 deletions Dockerfile--alpine.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ RUN adduser test sudo
EXPOSE 22
RUN ssh-keygen -A

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

# It allows to use sudo without password
RUN sh -c "echo \"test ALL=(ALL:ALL) NOPASSWD:ALL\"">>/etc/sudoers
RUN echo "test ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers

# THIS CMD IS NEEDED TO CONNECT THROUGH SSH WITHOUT PASSWORD
RUN sh -c "echo "test:*" | chpasswd -e"
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile--altlinux_10.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ FROM base2_with_python-${PYTHON_VERSION} AS final
RUN adduser test -G wheel

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

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

ENV LANG=C.UTF-8
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile--altlinux_11.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ FROM base2_with_python-${PYTHON_VERSION} AS final
RUN adduser test -G wheel

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

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

ENV LANG=C.UTF-8
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile--astralinux_1_7.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ RUN useradd -m test
# MY OLD:
# RUN sh -c "echo test ALL=NOPASSWD:ALL" >> /etc/sudoers
# AI:
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN echo "test ALL=(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
ADD --chown=test:test . /home/test/testgres
WORKDIR /home/test/testgres

ENV LANG=C.UTF-8
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile--ubuntu_24_04.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ RUN ssh-keygen -A
RUN useradd -m test

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

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

ENV LANG=C.UTF-8
Expand Down