File tree Expand file tree Collapse file tree 6 files changed +82
-3
lines changed
Expand file tree Collapse file tree 6 files changed +82
-3
lines changed Original file line number Diff line number Diff line change 33Base docker image for docker apache mod-php.
44
55This is a work in progress for now. Will get cleaned up over time.
6+
7+
8+ ## TODO
9+
10+ ### Write tests
11+
12+ #### Web tests
13+ - Run web container test as php user, since we don't expect much issues from root.
14+ - test a non existing web endpoint
15+ - test existing web endpoint
16+ - test endpoint that writes session data
17+ - test endpoint that tries to write to / folder
18+ - test executing privileged shell command
19+
20+ #### Cli
21+ - test workdir
22+ - test composer in path
23+ - test some of the dockerfile stuff (to be defined)
24+
25+ #### Dev
26+ - we could build a 2nd web-dev container and run dev specific tests there.
27+ - an xdebug test could be done but not as relevant since no network issues expected.
28+ - opcache not caching file changes in dev context is maybe doable
Original file line number Diff line number Diff line change 1+ version : " 3.6"
2+
3+ services :
4+ sut :
5+ build :
6+ context : test/
7+ links :
8+ - php
9+ # - php71
10+ # - php72
11+ # - php73
12+ # - php74
13+ php :
14+ build : .
15+ user : php
16+
17+ # The following is probably not the best way to go about it. It would run 4x this image at once.
18+ # Keeping as a note until we try test hooks.
19+ #
20+ # php71:
21+ # user: php
22+ # build:
23+ # context: .
24+ # args:
25+ # PHP_VERSION_TAG: 7.1-apache
26+ # php72:
27+ # user: php
28+ # build:
29+ # context: .
30+ # args:
31+ # PHP_VERSION_TAG: 7.2-apache
32+ # php73:
33+ # user: php
34+ # build:
35+ # context: .
36+ # args:
37+ # PHP_VERSION_TAG: 7.3-apache
38+ # php74:
39+ # user: php
40+ # build:
41+ # context: .
42+ # args:
43+ # PHP_VERSION_TAG: 7.4-apache
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33
4- docker build -f $DOCKERFILE_PATH -t ${IMAGE_NAME} .
54
65if [ $DOCKER_TAG == " latest" ]; then
6+ docker build -f $DOCKERFILE_PATH -t ${IMAGE_NAME} .
77 docker build --build-arg PHP_VERSION_TAG=7.1-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO :7.1-latest .
88 docker build --build-arg PHP_VERSION_TAG=7.2-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO :7.2-latest .
99 docker build --build-arg PHP_VERSION_TAG=7.3-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO :7.3-latest .
Original file line number Diff line number Diff line change 33
44set -e
55
6- docker push $IMAGE_NAME
7-
86if [ $DOCKER_TAG == " latest" ]; then
7+ docker push $IMAGE_NAME
98 docker push $DOCKER_REPO :7.1-latest
109 docker push $DOCKER_REPO :7.2-latest
1110 docker push $DOCKER_REPO :7.3-latest
Original file line number Diff line number Diff line change 1+ FROM ubuntu:trusty
2+
3+ RUN apt-get update && apt-get install -yq curl netcat && apt-get clean
4+
5+ WORKDIR /app
6+
7+ ADD test.sh /app/test.sh
8+
9+ CMD ["bash" , "test.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ # TODO write tests
5+ exit 0
You can’t perform that action at this time.
0 commit comments