Skip to content

Commit eb68efe

Browse files
committed
Enable ssh in php-*dev images
- Enable ssh - Set root and application to “dev”
1 parent 7a49492 commit eb68efe

58 files changed

Lines changed: 473 additions & 24 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

conf/provision.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ provision:
6363
php-dev:
6464
configuration:
6565
php-dev/general : '*'
66+
development/general: '*'
6667
php-apache-dev:
6768
configuration:
6869
apache/general : '*'

docker/php-dev/alpine-3-php7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ RUN /usr/local/bin/apk-install \
1818
graphviz \
1919
# Install php development stuff
2020
php7-xdebug \
21-
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-php-dev \
21+
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-dev --role webdevops-php-dev \
2222
&& /opt/docker/bin/bootstrap.sh
2323

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
APPLICATION_USER: "{{ lookup('env','APPLICATION_USER') }}"
4+
APPLICATION_GROUP: "{{ lookup('env','APPLICATION_GROUP') }}"
5+
APPLICATION_UID: "{{ lookup('env','APPLICATION_UID') }}"
6+
APPLICATION_GID: "{{ lookup('env','APPLICATION_GID') }}"
7+
APPLICATION_PASSWORD: "dev"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
- name: Enable ssh daemon
4+
shell: "/opt/docker/bin/control.sh service.enable ssh"
5+
6+
- name: Set application user password
7+
user:
8+
name: "{{ APPLICATION_USER }}"
9+
password: "{{ APPLICATION_PASSWORD | password_hash('sha256') }}"
10+
11+
- name: Set root password
12+
user:
13+
name: "root"
14+
password: "{{ APPLICATION_PASSWORD | password_hash('sha256') }}"
15+
16+
- name: Enable ssh root access
17+
lineinfile:
18+
dest: /etc/ssh/sshd_config
19+
regexp: '^PermitRootLogin'
20+
line: 'PermitRootLogin yes'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
- include: bootstrap.yml
4+
tags:
5+
- bootstrap

docker/php-dev/alpine-3/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ RUN /usr/local/bin/apk-install \
1818
graphviz \
1919
# Install php development stuff
2020
php5-xdebug \
21-
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-php-dev \
21+
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-dev --role webdevops-php-dev \
2222
&& /opt/docker/bin/bootstrap.sh
2323

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
APPLICATION_USER: "{{ lookup('env','APPLICATION_USER') }}"
4+
APPLICATION_GROUP: "{{ lookup('env','APPLICATION_GROUP') }}"
5+
APPLICATION_UID: "{{ lookup('env','APPLICATION_UID') }}"
6+
APPLICATION_GID: "{{ lookup('env','APPLICATION_GID') }}"
7+
APPLICATION_PASSWORD: "dev"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
- name: Enable ssh daemon
4+
shell: "/opt/docker/bin/control.sh service.enable ssh"
5+
6+
- name: Set application user password
7+
user:
8+
name: "{{ APPLICATION_USER }}"
9+
password: "{{ APPLICATION_PASSWORD | password_hash('sha256') }}"
10+
11+
- name: Set root password
12+
user:
13+
name: "root"
14+
password: "{{ APPLICATION_PASSWORD | password_hash('sha256') }}"
15+
16+
- name: Enable ssh root access
17+
lineinfile:
18+
dest: /etc/ssh/sshd_config
19+
regexp: '^PermitRootLogin'
20+
line: 'PermitRootLogin yes'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
- include: bootstrap.yml
4+
tags:
5+
- bootstrap

docker/php-dev/centos-7-php56/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ RUN wget -O - "https://packages.blackfire.io/fedora/blackfire.repo" | tee /etc/y
2020
php56w-pecl-xdebug \
2121
blackfire-php \
2222
blackfire-agent \
23-
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-php-dev \
23+
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-dev --role webdevops-php-dev \
2424
&& /opt/docker/bin/bootstrap.sh
2525

0 commit comments

Comments
 (0)