Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit537a9ac

Browse files
vsheparddmitry-lipetsk
vshepard
authored andcommitted
Add install ssh
(cherry picked from commitfec1e7a)
1 parent2d2532c commit537a9ac

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎Dockerfile.tmpl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ RUN if [ "${PYTHON_VERSION}" = "3" ] ; then \
99
apk add --no-cache curl python3 python3-dev build-base musl-dev \
1010
linux-headers py-virtualenv; \
1111
fi
12+
13+
# Install OpenSSH
14+
RUN apk add --no-cache openssh
15+
16+
# Configure SSH
17+
RUN echo "postgres:postgres" | chpasswd && \
18+
mkdir -p /var/run/sshd && \
19+
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
20+
1221
ENV LANG=C.UTF-8
1322

1423
RUN mkdir -p /pg
@@ -19,5 +28,8 @@ ADD . /pg/testgres
1928
WORKDIR /pg/testgres
2029
RUN chown -R postgres:postgres /pg
2130

31+
# Expose SSH port
32+
EXPOSE 22
33+
2234
USER postgres
23-
ENTRYPOINT PYTHON_VERSION=${PYTHON_VERSION} /run.sh
35+
ENTRYPOINT PYTHON_VERSION=${PYTHON_VERSION} /run.sh & /usr/sbin/sshd -D

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp