This repository has been archived by the owner on Feb 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New `eclipse/stack-base:debian-stretch` and `eclipse/stack-base:debian`. They are same. New `eclipse/stack-base:debian-jessie` for the backward compatibility. `php/5.6` uses `eclipse/stack-base:debian-jessie`. Signed-off-by: Masaki Muranaka <[email protected]>
- Loading branch information
Showing
7 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
debian-stretch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (c) 2012-2016 Codenvy, S.A. | ||
# All rights reserved. This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License v1.0 | ||
# which accompanies this distribution, and is available at | ||
# http://www.eclipse.org/legal/epl-v10.html | ||
# Contributors: | ||
# Codenvy, S.A. - initial API and implementation | ||
|
||
FROM debian:jessie-backports | ||
|
||
ARG OPENJDK_VERSION=8u171-b11-1~bpo8+1 | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 | ||
ENV PATH $JAVA_HOME/bin:$PATH | ||
RUN apt-get update && \ | ||
apt-get -y install \ | ||
openssh-server \ | ||
sudo \ | ||
rsync \ | ||
procps \ | ||
-t jessie-backports \ | ||
openjdk-8-jdk-headless=$OPENJDK_VERSION \ | ||
openjdk-8-source=$OPENJDK_VERSION \ | ||
wget \ | ||
unzip \ | ||
mc \ | ||
locales \ | ||
ca-certificates \ | ||
curl \ | ||
bash-completion \ | ||
git \ | ||
subversion && \ | ||
mkdir /var/run/sshd && \ | ||
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \ | ||
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||
useradd -u 1000 -G users,sudo -d /home/user --shell /bin/bash -m user && \ | ||
usermod -p "*" user && \ | ||
apt-get clean && \ | ||
apt-get -y autoremove \ | ||
&& apt-get -y clean \ | ||
&& rm -rf /var/lib/apt/lists/* && \ | ||
echo "#! /bin/bash\n set -e\n sudo /usr/sbin/sshd -D &\n exec \"\$@\"" > /home/user/entrypoint.sh && chmod a+x /home/user/entrypoint.sh | ||
|
||
COPY open-jdk-source-file-location /open-jdk-source-file-location | ||
RUN sed -i -e "s/{{OPENJDK_VERSION}}/$OPENJDK_VERSION/g" /open-jdk-source-file-location | ||
|
||
ENV LANG C.UTF-8 | ||
USER user | ||
RUN sudo localedef -i en_US -f UTF-8 en_US.UTF-8 && \ | ||
svn --version && \ | ||
sed -i 's/# store-passwords = no/store-passwords = yes/g' /home/user/.subversion/servers && \ | ||
sed -i 's/# store-plaintext-passwords = no/store-plaintext-passwords = yes/g' /home/user/.subversion/servers | ||
|
||
EXPOSE 22 4403 | ||
WORKDIR /projects | ||
ENTRYPOINT ["/home/user/entrypoint.sh"] | ||
CMD tail -f /dev/null |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2012-2018 Red Hat, Inc. | ||
# This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License v2.0 | ||
# which is available at http://www.eclipse.org/legal/epl-2.0.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Red Hat, Inc. - initial API and implementation | ||
|
||
set -e | ||
|
||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
|
||
if ! grep -Fq "${USER_ID}" /etc/passwd; then | ||
# current user is an arbitrary | ||
# user (its uid is not in the | ||
# container /etc/passwd). Let's fix that | ||
cat ${HOME}/passwd.template | \ | ||
sed "s/\${USER_ID}/${USER_ID}/g" | \ | ||
sed "s/\${GROUP_ID}/${GROUP_ID}/g" | \ | ||
sed "s/\${HOME}/\/home\/user/g" > /etc/passwd | ||
|
||
cat ${HOME}/group.template | \ | ||
sed "s/\${USER_ID}/${USER_ID}/g" | \ | ||
sed "s/\${GROUP_ID}/${GROUP_ID}/g" | \ | ||
sed "s/\${HOME}/\/home\/user/g" > /etc/group | ||
fi | ||
|
||
if test "${USER_ID}" = 0; then | ||
# current user is root | ||
/usr/sbin/sshd -D & | ||
elif sudo -n true > /dev/null 2>&1; then | ||
# current user is a suoder | ||
sudo /usr/sbin/sshd -D & | ||
fi | ||
|
||
exec "$@" |