@fishawack/lab-env 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/core/{0.0.20 → 0.0.21}/Dockerfile +1 -1
- package/core/{0.0.20 → 0.0.21}/entrypoint.sh +0 -0
- package/core/package.json +2 -2
- package/craftcms/3/docker-compose.yml +2 -1
- package/craftcms/3/php/Dockerfile +2 -5
- package/craftcms/3/php/policy.xml +99 -0
- package/drupal/9/docker-compose.yml +1 -1
- package/drupal/9/php/Dockerfile +0 -6
- package/laravel/8/docker-compose.yml +1 -1
- package/laravel/8/php/Dockerfile +2 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 2.0.2 (2022-04-26)
|
|
4
|
+
* [Change] Bumped core `0.0.20` to `0.0.21`
|
|
5
|
+
* [Bug] Lock eb-cli due to breaking change
|
|
6
|
+
* [Bug] Removed imagemagick from php containers as it's now included in base image
|
|
7
|
+
* [Misc] Updated core publish postversion command
|
|
8
|
+
|
|
3
9
|
### 2.0.1 (2022-04-13)
|
|
4
10
|
* [Bug] Explicitly set platform to fix M1 chip issues
|
|
5
11
|
|
|
@@ -132,7 +132,7 @@ RUN apt-get install -y locales
|
|
|
132
132
|
# Install AWS Elastic Beanstalk cli
|
|
133
133
|
RUN apt-get install -y zlib1g-dev libssl-dev libncurses-dev libffi-dev libsqlite3-dev libreadline-dev libbz2-dev
|
|
134
134
|
|
|
135
|
-
RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
|
|
135
|
+
RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git --depth 1 --branch v0.1.2
|
|
136
136
|
RUN ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
|
|
137
137
|
RUN rm -rf ./aws-elastic-beanstalk-cli-setup
|
|
138
138
|
|
|
File without changes
|
package/core/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "lab-env docker config for the @fishawack/core npm module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"postversion": "docker
|
|
6
|
+
"postversion": "mv ./*/ ./$npm_package_version && docker build ./*/ -t fishawack/core:$npm_package_version -t fishawack/core:latest && docker push fishawack/core:$npm_package_version && docker push fishawack/core:latest && git add . && git commit -m 'Bumped core to $npm_package_version'"
|
|
7
7
|
},
|
|
8
8
|
"author": "Mike Mellor",
|
|
9
9
|
"license": "ISC"
|
|
@@ -28,7 +28,7 @@ services:
|
|
|
28
28
|
build:
|
|
29
29
|
context: ./php/
|
|
30
30
|
dockerfile: Dockerfile
|
|
31
|
-
image: lab-env/craftcms/3/php:0.0.
|
|
31
|
+
image: lab-env/craftcms/3/php:0.0.2
|
|
32
32
|
init: true
|
|
33
33
|
working_dir: /app
|
|
34
34
|
networks:
|
|
@@ -36,6 +36,7 @@ services:
|
|
|
36
36
|
volumes:
|
|
37
37
|
- $CWD/:/app
|
|
38
38
|
- ./php/custom.conf:/opt/bitnami/php/etc/custom.conf
|
|
39
|
+
- ./php/policy.xml:/etc/ImageMagick-6/policy.xml
|
|
39
40
|
- vendor:/app/vendor
|
|
40
41
|
networks:
|
|
41
42
|
default:
|
|
@@ -6,11 +6,8 @@ MAINTAINER Mike Mellor
|
|
|
6
6
|
RUN apt-get update && \
|
|
7
7
|
apt-get install -y mariadb-client
|
|
8
8
|
|
|
9
|
-
# Install
|
|
10
|
-
RUN apt-get install -y
|
|
11
|
-
|
|
12
|
-
# PHP Imagick ext
|
|
13
|
-
RUN pecl install imagick && docker-php-ext-enable imagick
|
|
9
|
+
# Install ghostscript
|
|
10
|
+
RUN apt-get install -y ghostscript
|
|
14
11
|
|
|
15
12
|
# Cleanup apt-get install folders
|
|
16
13
|
RUN apt-get clean && \
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE policymap [
|
|
3
|
+
<!ELEMENT policymap (policy)*>
|
|
4
|
+
<!ATTLIST policymap xmlns CDATA #FIXED ''>
|
|
5
|
+
<!ELEMENT policy EMPTY>
|
|
6
|
+
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
|
|
7
|
+
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
|
|
8
|
+
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
|
|
9
|
+
]>
|
|
10
|
+
<!--
|
|
11
|
+
Configure ImageMagick policies.
|
|
12
|
+
|
|
13
|
+
Domains include system, delegate, coder, filter, path, or resource.
|
|
14
|
+
|
|
15
|
+
Rights include none, read, write, execute and all. Use | to combine them,
|
|
16
|
+
for example: "read | write" to permit read from, or write to, a path.
|
|
17
|
+
|
|
18
|
+
Use a glob expression as a pattern.
|
|
19
|
+
|
|
20
|
+
Suppose we do not want users to process MPEG video images:
|
|
21
|
+
|
|
22
|
+
<policy domain="delegate" rights="none" pattern="mpeg:decode" />
|
|
23
|
+
|
|
24
|
+
Here we do not want users reading images from HTTP:
|
|
25
|
+
|
|
26
|
+
<policy domain="coder" rights="none" pattern="HTTP" />
|
|
27
|
+
|
|
28
|
+
The /repository file system is restricted to read only. We use a glob
|
|
29
|
+
expression to match all paths that start with /repository:
|
|
30
|
+
|
|
31
|
+
<policy domain="path" rights="read" pattern="/repository/*" />
|
|
32
|
+
|
|
33
|
+
Lets prevent users from executing any image filters:
|
|
34
|
+
|
|
35
|
+
<policy domain="filter" rights="none" pattern="*" />
|
|
36
|
+
|
|
37
|
+
Any large image is cached to disk rather than memory:
|
|
38
|
+
|
|
39
|
+
<policy domain="resource" name="area" value="1GP"/>
|
|
40
|
+
|
|
41
|
+
Use the default system font unless overwridden by the application:
|
|
42
|
+
|
|
43
|
+
<policy domain="system" name="font" value="/usr/share/fonts/favorite.ttf"/>
|
|
44
|
+
|
|
45
|
+
Define arguments for the memory, map, area, width, height and disk resources
|
|
46
|
+
with SI prefixes (.e.g 100MB). In addition, resource policies are maximums
|
|
47
|
+
for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB
|
|
48
|
+
exceeds policy maximum so memory limit is 1GB).
|
|
49
|
+
|
|
50
|
+
Rules are processed in order. Here we want to restrict ImageMagick to only
|
|
51
|
+
read or write a small subset of proven web-safe image types:
|
|
52
|
+
|
|
53
|
+
<policy domain="delegate" rights="none" pattern="*" />
|
|
54
|
+
<policy domain="filter" rights="none" pattern="*" />
|
|
55
|
+
<policy domain="coder" rights="none" pattern="*" />
|
|
56
|
+
<policy domain="coder" rights="read|write" pattern="{GIF,JPEG,PNG,WEBP}" />
|
|
57
|
+
-->
|
|
58
|
+
<policymap>
|
|
59
|
+
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
|
|
60
|
+
<policy domain="resource" name="memory" value="256MiB"/>
|
|
61
|
+
<policy domain="resource" name="map" value="512MiB"/>
|
|
62
|
+
<policy domain="resource" name="width" value="16KP"/>
|
|
63
|
+
<policy domain="resource" name="height" value="16KP"/>
|
|
64
|
+
<!-- <policy domain="resource" name="list-length" value="128"/> -->
|
|
65
|
+
<policy domain="resource" name="area" value="128MP"/>
|
|
66
|
+
<policy domain="resource" name="disk" value="1GiB"/>
|
|
67
|
+
<!-- <policy domain="resource" name="file" value="768"/> -->
|
|
68
|
+
<!-- <policy domain="resource" name="thread" value="4"/> -->
|
|
69
|
+
<!-- <policy domain="resource" name="throttle" value="0"/> -->
|
|
70
|
+
<!-- <policy domain="resource" name="time" value="3600"/> -->
|
|
71
|
+
<!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
|
|
72
|
+
<!-- <policy domain="module" rights="none" pattern="{PS,PDF,XPS}" /> -->
|
|
73
|
+
<!-- <policy domain="path" rights="none" pattern="@*" /> -->
|
|
74
|
+
<!-- <policy domain="cache" name="memory-map" value="anonymous"/> -->
|
|
75
|
+
<!-- <policy domain="cache" name="synchronize" value="True"/> -->
|
|
76
|
+
<!-- <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/> -->
|
|
77
|
+
<!-- <policy domain="system" name="max-memory-request" value="256MiB"/> -->
|
|
78
|
+
<!-- <policy domain="system" name="shred" value="2"/> -->
|
|
79
|
+
<!-- <policy domain="system" name="precision" value="6"/> -->
|
|
80
|
+
<!-- <policy domain="system" name="font" value="/path/to/font.ttf"/> -->
|
|
81
|
+
<!-- <policy domain="system" name="pixel-cache-memory" value="anonymous"/> -->
|
|
82
|
+
<!-- <policy domain="system" name="shred" value="2"/> -->
|
|
83
|
+
<!-- <policy domain="system" name="precision" value="6"/> -->
|
|
84
|
+
<!-- not needed due to the need to use explicitly by mvg: -->
|
|
85
|
+
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
|
|
86
|
+
<!-- use curl -->
|
|
87
|
+
<policy domain="delegate" rights="none" pattern="URL" />
|
|
88
|
+
<policy domain="delegate" rights="none" pattern="HTTPS" />
|
|
89
|
+
<policy domain="delegate" rights="none" pattern="HTTP" />
|
|
90
|
+
<!-- in order to avoid to get image with password text -->
|
|
91
|
+
<policy domain="path" rights="none" pattern="@*"/>
|
|
92
|
+
<!-- disable ghostscript format types -->
|
|
93
|
+
<!-- <policy domain="coder" rights="none" pattern="PS" />
|
|
94
|
+
<policy domain="coder" rights="none" pattern="PS2" />
|
|
95
|
+
<policy domain="coder" rights="none" pattern="PS3" />
|
|
96
|
+
<policy domain="coder" rights="none" pattern="EPS" />
|
|
97
|
+
<policy domain="coder" rights="none" pattern="PDF" />
|
|
98
|
+
<policy domain="coder" rights="none" pattern="XPS" /> -->
|
|
99
|
+
</policymap>
|
package/drupal/9/php/Dockerfile
CHANGED
|
@@ -6,12 +6,6 @@ MAINTAINER Mike Mellor
|
|
|
6
6
|
RUN apt-get update && \
|
|
7
7
|
apt-get install -y mariadb-client
|
|
8
8
|
|
|
9
|
-
# Install Imagemagick
|
|
10
|
-
RUN apt-get install -y libmagickwand-dev --no-install-recommends
|
|
11
|
-
|
|
12
|
-
# PHP Imagick ext
|
|
13
|
-
RUN pecl install imagick && docker-php-ext-enable imagick
|
|
14
|
-
|
|
15
9
|
# Install ghostscript
|
|
16
10
|
RUN apt-get install -y ghostscript
|
|
17
11
|
|
package/laravel/8/php/Dockerfile
CHANGED
|
@@ -2,15 +2,9 @@ FROM chialab/php:7.4-fpm
|
|
|
2
2
|
|
|
3
3
|
MAINTAINER Mike Mellor
|
|
4
4
|
|
|
5
|
-
# Install Imagemagick
|
|
6
|
-
RUN apt-get update && \
|
|
7
|
-
apt-get install -y libmagickwand-dev --no-install-recommends
|
|
8
|
-
|
|
9
|
-
# PHP Imagick ext
|
|
10
|
-
RUN pecl install imagick && docker-php-ext-enable imagick
|
|
11
|
-
|
|
12
5
|
# Install ghostscript
|
|
13
|
-
RUN apt-get
|
|
6
|
+
RUN apt-get update && \
|
|
7
|
+
apt-get install -y ghostscript
|
|
14
8
|
|
|
15
9
|
# Cleanup apt-get install folders
|
|
16
10
|
RUN apt-get clean && \
|