Skip to content

Commit ace9576

Browse files
committed
initial commit
1 parent 9394070 commit ace9576

15 files changed

Lines changed: 506 additions & 0 deletions

File tree

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
.git
3+
.gitignore
4+
.editorconfig
5+
.github
6+
docker-compose.yml
7+
README.md
8+
test

.drone.yml

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
kind: pipeline
2+
type: docker
3+
name: build-test-build
4+
5+
platform:
6+
os: linux
7+
arch: amd64
8+
9+
trigger:
10+
event:
11+
- push
12+
13+
steps:
14+
- name: build test image
15+
image: plugins/docker:linux-amd64
16+
settings:
17+
username:
18+
from_secret: DOCKERHUB_USERNAME
19+
password:
20+
from_secret: DOCKERHUB_PASSWORD
21+
repo: fabiodcorreia/base-php
22+
auto_tag: true
23+
auto_tag_suffix: test
24+
purge: true
25+
26+
---
27+
kind: pipeline
28+
type: docker
29+
name: docker-test
30+
31+
platform:
32+
os: linux
33+
arch: amd64
34+
35+
trigger:
36+
status:
37+
- success
38+
39+
steps:
40+
- name: base_node_test
41+
image: fabiodcorreia/base-php:test
42+
pull: always
43+
environment:
44+
PUID: "1000"
45+
PGID: "1000"
46+
commands:
47+
- sleep 60
48+
- sh ./test/start.sh
49+
50+
depends_on:
51+
- build-test-build
52+
53+
---
54+
kind: pipeline
55+
type: docker
56+
name: docker-amd64
57+
58+
platform:
59+
os: linux
60+
arch: amd64
61+
62+
trigger:
63+
event:
64+
- tag
65+
66+
steps:
67+
- name: build and publish amd64
68+
image: plugins/docker:linux-amd64
69+
settings:
70+
build_args:
71+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
72+
- VERSION=${DRONE_TAG}
73+
username:
74+
from_secret: DOCKERHUB_USERNAME
75+
password:
76+
from_secret: DOCKERHUB_PASSWORD
77+
repo: fabiodcorreia/base-php
78+
auto_tag: true
79+
auto_tag_suffix: amd64
80+
purge: true
81+
82+
---
83+
kind: pipeline
84+
type: docker
85+
name: docker-arm64
86+
87+
platform:
88+
os: linux
89+
arch: arm64
90+
91+
trigger:
92+
event:
93+
- tag
94+
95+
steps:
96+
- name: build and publish arm64v8
97+
image: plugins/docker:linux-arm64
98+
settings:
99+
build_args:
100+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
101+
- VERSION=${DRONE_TAG}
102+
username:
103+
from_secret: DOCKERHUB_USERNAME
104+
password:
105+
from_secret: DOCKERHUB_PASSWORD
106+
repo: fabiodcorreia/base-php
107+
auto_tag: true
108+
auto_tag_suffix: arm64v8
109+
purge: true
110+
111+
---
112+
kind: pipeline
113+
type: docker
114+
name: docker-arm32
115+
116+
platform:
117+
os: linux
118+
arch: arm
119+
120+
trigger:
121+
event:
122+
- tag
123+
124+
steps:
125+
- name: build and publish arm32v7
126+
image: plugins/docker:linux-arm
127+
settings:
128+
build_args:
129+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
130+
- VERSION=${DRONE_TAG}
131+
username:
132+
from_secret: DOCKERHUB_USERNAME
133+
password:
134+
from_secret: DOCKERHUB_PASSWORD
135+
repo: fabiodcorreia/base-php
136+
auto_tag: true
137+
auto_tag_suffix: arm32v7
138+
purge: true
139+
140+
---
141+
kind: pipeline
142+
type: docker
143+
name: docker-manifest
144+
145+
platform:
146+
os: linux
147+
arch: amd64
148+
149+
trigger:
150+
event:
151+
- tag
152+
153+
depends_on:
154+
- docker-amd64
155+
- docker-arm64
156+
- docker-arm32
157+
158+
steps:
159+
- name: manifest
160+
pull: always
161+
image: plugins/manifest
162+
settings:
163+
auto_tag: true
164+
ignore_missing: true
165+
spec: manifest.tmpl
166+
username:
167+
from_secret: DOCKERHUB_USERNAME
168+
password:
169+
from_secret: DOCKERHUB_PASSWORD
170+
- name: manifest latest
171+
pull: always
172+
image: plugins/manifest
173+
settings:
174+
tag: latest
175+
ignore_missing: true
176+
spec: manifest.tmpl
177+
username:
178+
from_secret: DOCKERHUB_USERNAME
179+
password:
180+
from_secret: DOCKERHUB_PASSWORD

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 2
8+
trim_trailing_whitespace = true
9+
end_of_line = lf
10+
11+
[Makefile]
12+
indent_style = tab
13+
indent_size = 4
14+
15+
[*.mk]
16+
indent_style = tab
17+
indent_size = 4
18+
trim_trailing_whitespace = false
19+
20+
[*.go]
21+
indent_style = tab
22+
indent_size = 4

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,linux
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,linux
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
# General
21+
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
25+
# Icon must end with two \r
26+
Icon
27+
28+
# Thumbnails
29+
._*
30+
31+
# Files that might appear in the root of a volume
32+
.DocumentRevisions-V100
33+
.fseventsd
34+
.Spotlight-V100
35+
.TemporaryItems
36+
.Trashes
37+
.VolumeIcon.icns
38+
.com.apple.timemachine.donotpresent
39+
40+
# Directories potentially created on remote AFP share
41+
.AppleDB
42+
.AppleDesktop
43+
Network Trash Folder
44+
Temporary Items
45+
.apdisk
46+
47+
### VisualStudioCode ###
48+
.vscode/*
49+
!.vscode/settings.json
50+
!.vscode/tasks.json
51+
!.vscode/launch.json
52+
!.vscode/extensions.json
53+
54+
### VisualStudioCode Patch ###
55+
# Ignore all local history of files
56+
.history
57+
58+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,linux

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM fabiodcorreia/base-alpine:1.0.0
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
LABEL build_version="version:- ${VERSION} Build-date:- ${BUILD_DATE}"
7+
LABEL maintainer="fabiodcorreia"
8+
9+
RUN \
10+
echo "**** install runtime packages ****" && \
11+
apk add --no-cache nginx \
12+
php7 \
13+
php7-fileinfo \
14+
php7-fpm \
15+
php7-json \
16+
php7-mbstring \
17+
php7-openssl \
18+
php7-session \
19+
php7-simplexml \
20+
php7-xml \
21+
php7-xmlwriter \
22+
php7-zlib && \
23+
echo "**** configure nginx ****" && \
24+
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/fastcgi_params && \
25+
rm -f /etc/nginx/conf.d/default.conf && \
26+
echo "**** cleanup ****" && \
27+
rm -rf \
28+
/tmp/* \
29+
/var/tmp/*
30+
31+
# add local files
32+
COPY root/ /
33+
34+
# ports and volumes
35+
EXPOSE 80
36+
37+
VOLUME /config

manifest.tmpl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
image: fabiodcorreia/base-php:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
2+
{{#if build.tags}}
3+
tags:
4+
{{#each build.tags}}
5+
- {{this}}
6+
{{/each}}
7+
{{/if}}
8+
manifests:
9+
- image: fabiodcorreia/base-php:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
10+
platform:
11+
architecture: amd64
12+
os: linux
13+
- image: fabiodcorreia/base-php:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64v8
14+
platform:
15+
architecture: arm64
16+
os: linux
17+
variant: v8
18+
- image: fabiodcorreia/base-php:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm32v7
19+
platform:
20+
architecture: arm
21+
os: linux
22+
variant: v7

package_versions.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
alpine-baselayout-3.2.0-r7
2+
alpine-keys-2.2-r0
3+
apk-tools-2.10.5-r1
4+
argon2-libs-20190702-r1
5+
bash-5.0.17-r0
6+
busybox-1.31.1-r19
7+
ca-certificates-20191127-r4
8+
ca-certificates-bundle-20191127-r4
9+
coreutils-8.32-r0
10+
libacl-2.2.53-r0
11+
libattr-2.4.48-r0
12+
libc-utils-0.7.2-r3
13+
libcrypto1.1-1.1.1g-r0
14+
libedit-20191231.3.1-r0
15+
libintl-0.20.2-r0
16+
libproc-3.3.16-r0
17+
libssl1.1-1.1.1g-r0
18+
libtls-standalone-2.9.1-r1
19+
libxml2-2.9.10-r4
20+
linux-pam-1.3.1-r4
21+
musl-1.1.24-r8
22+
musl-utils-1.1.24-r8
23+
ncurses-libs-6.2_p20200523-r0
24+
ncurses-terminfo-base-6.2_p20200523-r0
25+
nginx-1.18.0-r0
26+
pcre-8.44-r0
27+
pcre2-10.35-r0
28+
php7-7.3.19-r0
29+
php7-common-7.3.19-r0
30+
php7-fileinfo-7.3.19-r0
31+
php7-fpm-7.3.19-r0
32+
php7-json-7.3.19-r0
33+
php7-mbstring-7.3.19-r0
34+
php7-openssl-7.3.19-r0
35+
php7-session-7.3.19-r0
36+
php7-simplexml-7.3.19-r0
37+
php7-xml-7.3.19-r0
38+
php7-xmlwriter-7.3.19-r0
39+
procps-3.3.16-r0
40+
readline-8.0.4-r0
41+
scanelf-1.2.6-r0
42+
shadow-4.8.1-r0
43+
ssl_client-1.31.1-r19
44+
tzdata-2020a-r0
45+
xz-5.2.5-r0
46+
xz-libs-5.2.5-r0
47+
zlib-1.2.11-r3

packages.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
docker build . -t base-php
4+
docker run --rm --entrypoint '/bin/sh' -v ${PWD}:/tmp base-php -c '\
5+
apk info -v | sort > /tmp/package_versions.txt && \
6+
chmod 777 /tmp/package_versions.txt'

0 commit comments

Comments
 (0)