Skip to content

Commit

Permalink
Add SSH dependency and configuration to dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
rlenferink committed Sep 29, 2023
1 parent 55ad18a commit ccf2ed9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/.project
.DS_Store
.clion.source.upload.marker
.idea
.vscode
*.iml
Expand Down
34 changes: 30 additions & 4 deletions container/Containerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,32 @@
# specific language governing permissions and limitations
# under the License.

# SSH credentials:
# root@password

FROM docker.io/library/ubuntu:22.04@sha256:b492494d8e0113c4ad3fe4528a4b5ff89faa5331f7d52c5c138196f69ce176a6

# Install build & Celix dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
# Install dependencies
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
# Development dependencies \
dos2unix \
git \
locales-all \
rsync \
tar \
ssh \
tzdata \
# Build dependencies \
build-essential \
ccache \
cmake \
curl \
default-jdk \
git \
gcc \
g++ \
gdb \
make \
python3 \
# Celix dependencies \
civetweb \
Expand All @@ -43,3 +57,15 @@ RUN apt-get update && \
uuid-dev && \
apt-get clean

RUN ( \
echo 'Port 2233'; \
echo 'LogLevel INFO'; \
echo 'PermitRootLogin yes'; \
echo 'PasswordAuthentication yes'; \
echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \
) > /etc/ssh/sshd_config_clion \
&& mkdir /run/sshd

RUN yes password | passwd root

CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config_clion"]

0 comments on commit ccf2ed9

Please sign in to comment.