Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit ac830b2

Browse files
committed
Update stack-base:debian.
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 <monaka@monami-ya.com>
1 parent b088277 commit ac830b2

File tree

7 files changed

+109
-14
lines changed

7 files changed

+109
-14
lines changed

recipes/php/5.6/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse/stack-base:debian
1+
FROM eclipse/stack-base:debian-jessie
22
ENV DEBIAN_FRONTEND noninteractive
33
ENV CHE_MYSQL_PASSWORD=che
44
ENV CHE_MYSQL_DB=che_db
@@ -43,4 +43,4 @@ RUN sudo apt-get update && \
4343
sudo service mysql restart && sudo mysql -u root --password="root" -e "CREATE USER '$CHE_MYSQL_USER'@'%' IDENTIFIED BY '"$CHE_MYSQL_PASSWORD"'" && \
4444
sudo mysql -u root --password="root" -e "GRANT ALL PRIVILEGES ON *.* TO '$CHE_MYSQL_USER'@'%' IDENTIFIED BY '"$CHE_MYSQL_PASSWORD"'; FLUSH PRIVILEGES;" && \
4545
sudo mysql -u root --password="root" -e "CREATE DATABASE $CHE_MYSQL_DB;"
46-
EXPOSE 80
46+
EXPOSE 80

recipes/stack-base/debian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
debian-stretch
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2012-2016 Codenvy, S.A.
2+
# All rights reserved. This program and the accompanying materials
3+
# are made available under the terms of the Eclipse Public License v1.0
4+
# which accompanies this distribution, and is available at
5+
# http://www.eclipse.org/legal/epl-v10.html
6+
# Contributors:
7+
# Codenvy, S.A. - initial API and implementation
8+
9+
FROM debian:jessie-backports
10+
11+
ARG OPENJDK_VERSION=8u171-b11-1~bpo8+1
12+
13+
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
14+
ENV PATH $JAVA_HOME/bin:$PATH
15+
RUN apt-get update && \
16+
apt-get -y install \
17+
openssh-server \
18+
sudo \
19+
rsync \
20+
procps \
21+
-t jessie-backports \
22+
openjdk-8-jdk-headless=$OPENJDK_VERSION \
23+
openjdk-8-source=$OPENJDK_VERSION \
24+
wget \
25+
unzip \
26+
mc \
27+
locales \
28+
ca-certificates \
29+
curl \
30+
bash-completion \
31+
git \
32+
subversion && \
33+
mkdir /var/run/sshd && \
34+
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \
35+
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
36+
useradd -u 1000 -G users,sudo -d /home/user --shell /bin/bash -m user && \
37+
usermod -p "*" user && \
38+
apt-get clean && \
39+
apt-get -y autoremove \
40+
&& apt-get -y clean \
41+
&& rm -rf /var/lib/apt/lists/* && \
42+
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
43+
44+
COPY open-jdk-source-file-location /open-jdk-source-file-location
45+
RUN sed -i -e "s/{{OPENJDK_VERSION}}/$OPENJDK_VERSION/g" /open-jdk-source-file-location
46+
47+
ENV LANG C.UTF-8
48+
USER user
49+
RUN sudo localedef -i en_US -f UTF-8 en_US.UTF-8 && \
50+
svn --version && \
51+
sed -i 's/# store-passwords = no/store-passwords = yes/g' /home/user/.subversion/servers && \
52+
sed -i 's/# store-plaintext-passwords = no/store-plaintext-passwords = yes/g' /home/user/.subversion/servers
53+
54+
EXPOSE 22 4403
55+
WORKDIR /projects
56+
ENTRYPOINT ["/home/user/entrypoint.sh"]
57+
CMD tail -f /dev/null
File renamed without changes.

recipes/stack-base/debian/open-jdk-source-file-location renamed to recipes/stack-base/debian-jessie/open-jdk-source-file-location

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ This package distributes OpenJDK binaries that are licensed under the GPL.
22
The source code and build scripts used to create this binary are available for download at:
33

44
OpenJDK Package installed via package manager: openjdk-8-jre-headless, openjdk-8-source
5-
OpenJDK version: 8u171-b11-1~bpo8+1
6-
OpenJDK sources: http://cdn-fastly.deb.debian.org/debian/pool/main/o/openjdk-8/openjdk-8_8u171-b11-1~bpo8+1.debian.tar.xz
5+
OpenJDK version: {{OPENJDK_VERSION}}
6+
OpenJDK sources: http://cdn-fastly.deb.debian.org/debian/pool/main/o/openjdk-8/openjdk-8_{{OPENJDK_VERSION}}.debian.tar.xz
77

88
The following license applies to OpenJDK
99

recipes/stack-base/debian/Dockerfile renamed to recipes/stack-base/debian-stretch/Dockerfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
# Contributors:
99
# Red Hat, Inc. - initial API and implementation
1010

11-
FROM debian:jessie
11+
FROM debian:stretch
1212
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
1313
ENV PATH $JAVA_HOME/bin:$PATH
14-
RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list && \
15-
apt-get update && \
14+
RUN apt-get update && \
1615
apt-get -y install \
16+
git \
17+
subversion \
18+
gnupg2 \
1719
openssh-server \
1820
sudo \
1921
rsync \
2022
procps \
21-
-t jessie-backports \
22-
openjdk-8-jdk-headless=8u171-b11-1~bpo8+1 \
23-
openjdk-8-source=8u171-b11-1~bpo8+1 \
23+
openjdk-8-jdk-headless \
24+
openjdk-8-source \
2425
wget \
2526
unzip \
2627
mc \
@@ -34,9 +35,6 @@ RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/s
3435
# Adding user to the 'root' is a workaround for https://issues.jboss.org/browse/CDK-305
3536
useradd -u 1000 -G users,sudo,root -d /home/user --shell /bin/bash -m user && \
3637
usermod -p "*" user && \
37-
sudo echo -e "deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main\ndeb-src http://ppa.launchpad.net/git-core/ppa/ubuntu precise main" >> /etc/apt/sources.list.d/sources.list && \
38-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \
39-
sudo apt-get install git subversion -y && \
4038
apt-get clean && \
4139
apt-get -y autoremove \
4240
&& apt-get -y clean \
@@ -48,7 +46,6 @@ RUN sudo localedef -i en_US -f UTF-8 en_US.UTF-8 && \
4846
svn --version && \
4947
sed -i 's/# store-passwords = no/store-passwords = yes/g' /home/user/.subversion/servers && \
5048
sed -i 's/# store-plaintext-passwords = no/store-plaintext-passwords = yes/g' /home/user/.subversion/servers
51-
COPY open-jdk-source-file-location /open-jdk-source-file-location
5249
EXPOSE 22 4403
5350
WORKDIR /projects
5451

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
# Copyright (c) 2012-2018 Red Hat, Inc.
3+
# This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License v2.0
5+
# which is available at http://www.eclipse.org/legal/epl-2.0.html
6+
#
7+
# SPDX-License-Identifier: EPL-2.0
8+
#
9+
# Contributors:
10+
# Red Hat, Inc. - initial API and implementation
11+
12+
set -e
13+
14+
export USER_ID=$(id -u)
15+
export GROUP_ID=$(id -g)
16+
17+
if ! grep -Fq "${USER_ID}" /etc/passwd; then
18+
# current user is an arbitrary
19+
# user (its uid is not in the
20+
# container /etc/passwd). Let's fix that
21+
cat ${HOME}/passwd.template | \
22+
sed "s/\${USER_ID}/${USER_ID}/g" | \
23+
sed "s/\${GROUP_ID}/${GROUP_ID}/g" | \
24+
sed "s/\${HOME}/\/home\/user/g" > /etc/passwd
25+
26+
cat ${HOME}/group.template | \
27+
sed "s/\${USER_ID}/${USER_ID}/g" | \
28+
sed "s/\${GROUP_ID}/${GROUP_ID}/g" | \
29+
sed "s/\${HOME}/\/home\/user/g" > /etc/group
30+
fi
31+
32+
if test "${USER_ID}" = 0; then
33+
# current user is root
34+
/usr/sbin/sshd -D &
35+
elif sudo -n true > /dev/null 2>&1; then
36+
# current user is a suoder
37+
sudo /usr/sbin/sshd -D &
38+
fi
39+
40+
exec "$@"

0 commit comments

Comments
 (0)