@fishawack/lab-env 4.40.1 → 4.41.0-beta.1

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.
@@ -0,0 +1,24 @@
1
+ #!/bin/bash
2
+
3
+ # Setting $FW_ROOT will bypass the user switch to php
4
+ if [ -z "$FW_ROOT" ]; then
5
+ # Set php user id to match host users id so no permission issues outside of docker
6
+ usermod -u $USER_UID php &>/dev/null
7
+
8
+ # Fix access rights to stdout and stderr
9
+ chown php /proc/self/fd/{1,2}
10
+
11
+ # Own the vendor folder otherwise it'll be owned by root/previous php id which will prevent writing
12
+ chown php /app/vendor
13
+
14
+ # If bash command then start an non login interactive shell
15
+ if [[ "$@" == "bash" ]]; then
16
+ exec su php
17
+ # Otherwise pipe the command into the non login non interactive shell as a command to exec
18
+ else
19
+ exec su php -c "$@"
20
+ fi
21
+ else
22
+ echo "Accessing as root"
23
+ exec "$@"
24
+ fi
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "php",
3
+ "version": "1.0.0",
4
+ "description": "lab-env docker config for the php module",
5
+ "scripts": {
6
+ "preversion": "docker login",
7
+ "postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-laravel-10-php:$npm_package_version -t fishawack/lab-env-laravel-10-php:latest --push . && git add . && git commit -m \"build: Bumped fishawack/lab-env-laravel-10-php to $npm_package_version\""
8
+ },
9
+ "author": "Mike Mellor",
10
+ "license": "ISC"
11
+ }
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.40.1",
3
+ "version": "4.41.0-beta.1",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {
@@ -17,8 +17,8 @@
17
17
  "homepage": "https://bitbucket.org/fishawackdigital/lab-env#readme",
18
18
  "type": "commonjs",
19
19
  "bin": {
20
- "lab-env": "./cli.js",
21
- "fw": "./cli.js"
20
+ "lab-env": "cli.js",
21
+ "fw": "cli.js"
22
22
  },
23
23
  "dependencies": {
24
24
  "@aws-sdk/client-cloudfront": "^3.141.0",
@@ -0,0 +1,4 @@
1
+ ## Changelog
2
+
3
+ ### 1.0.0 (2025-07-21)
4
+ * [Misc] initial commit
@@ -0,0 +1,40 @@
1
+ FROM chialab/php:8.2-fpm AS development
2
+
3
+ LABEL org.opencontainers.image.authors="Mike Mellor <mike.mellor@avalerehealth.com>"
4
+
5
+ # Install ghostscript
6
+ RUN apt-get update && \
7
+ apt-get install -y ghostscript
8
+
9
+ # Copy custom.ini
10
+ COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini
11
+
12
+ # Copy ImageMagick policy
13
+ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
14
+
15
+ # Add php user
16
+ RUN useradd -m -G www-data -s /bin/bash php
17
+
18
+ # Change composer home dir
19
+ ENV COMPOSER_HOME=/home/php/.composer
20
+
21
+ # Cleanup apt-get install folders
22
+ RUN apt-get clean && \
23
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24
+
25
+ COPY entrypoint.sh /bin/entrypoint.sh
26
+ RUN chmod +x /bin/entrypoint.sh
27
+ ENTRYPOINT ["/bin/entrypoint.sh"]
28
+
29
+ CMD ["php-fpm"]
30
+
31
+ FROM fishawack/lab-env-laravel-9-php:latest AS production
32
+
33
+ # Copy source code into container
34
+ COPY . /app
35
+
36
+ # Install composer dependencies
37
+ RUN TEMPFILE=$(mktemp) && \
38
+ curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
39
+ php <"$TEMPFILE" && \
40
+ ./composer.phar install -d /app --no-dev --no-interaction --no-ansi --optimize-autoloader
@@ -0,0 +1,5 @@
1
+ file_uploads = On
2
+ memory_limit = 500M
3
+ upload_max_filesize = 500M
4
+ post_max_size = 500M
5
+ max_execution_time = 600
@@ -0,0 +1,23 @@
1
+ services:
2
+ php:
3
+ build:
4
+ context: $DIRNAME/php/8.2
5
+ target: development
6
+ image: fishawack/lab-env-php-8-2:${FW_PHP_8_2_VERSION:-latest}
7
+ init: true
8
+ working_dir: /app
9
+ networks:
10
+ - default
11
+ volumes:
12
+ - $CWD/:/app
13
+ - vendor:/app/vendor
14
+ environment:
15
+ - FW_ROOT=${FW_ROOT:-}
16
+ - USER_UID=${USER_UID:-0}
17
+ - USER_GID=${USER_GID:-0}
18
+ networks:
19
+ default:
20
+ driver: "bridge"
21
+ volumes:
22
+ vendor:
23
+ driver: "local"
@@ -0,0 +1,24 @@
1
+ #!/bin/bash
2
+
3
+ # Setting $FW_ROOT will bypass the user switch to php
4
+ if [ -z "$FW_ROOT" ]; then
5
+ # Set php user id to match host users id so no permission issues outside of docker
6
+ usermod -u $USER_UID php &>/dev/null
7
+
8
+ # Fix access rights to stdout and stderr
9
+ chown php /proc/self/fd/{1,2}
10
+
11
+ # Own the vendor folder otherwise it'll be owned by root/previous php id which will prevent writing
12
+ chown php /app/vendor
13
+
14
+ # If bash command then start an non login interactive shell
15
+ if [[ "$@" == "bash" ]]; then
16
+ exec su php
17
+ # Otherwise pipe the command into the non login non interactive shell as a command to exec
18
+ else
19
+ exec su php -c "$@"
20
+ fi
21
+ else
22
+ echo "Accessing as root"
23
+ exec "$@"
24
+ fi
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "php",
3
+ "version": "1.0.0",
4
+ "description": "lab-env docker config for the php module",
5
+ "scripts": {
6
+ "preversion": "docker login",
7
+ "postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-php-8-2:$npm_package_version -t fishawack/lab-env-php-8-2:latest --push . && git add . && git commit -m \"build: Bumped fishawack/lab-env-php-8-2 to $npm_package_version\""
8
+ },
9
+ "author": "Mike Mellor",
10
+ "license": "ISC"
11
+ }
@@ -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>
@@ -1,124 +0,0 @@
1
- ## Changelog
2
-
3
- ### 1.7.2 (2025-05-15)
4
-
5
- #### Bug Fixes
6
-
7
- * use n flag in symlink to override if symlink already exists ([cdc1a41](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/cdc1a41639785f65e2076477f33e86a8ea8cb8fa))
8
-
9
- ### 1.7.2-beta.1 (2025-05-15)
10
-
11
- #### Bug Fixes
12
-
13
- * use n flag in symlink to override if symlink already exists ([cdc1a41](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/cdc1a41639785f65e2076477f33e86a8ea8cb8fa))
14
-
15
- ### 1.7.1 (2025-05-15)
16
-
17
- #### Reverts
18
-
19
- * Revert "feat: installed husky npm module globally" ([91cc456](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/91cc4564ea2fd6650924732a2a75cb4a9fb749b5))
20
-
21
- ### 1.7.1-beta.1 (2025-05-14)
22
-
23
- #### Reverts
24
-
25
- * Revert "feat: installed husky npm module globally" ([91cc456](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/91cc4564ea2fd6650924732a2a75cb4a9fb749b5))
26
-
27
- ### 1.7.0 (2025-05-14)
28
-
29
- #### Features
30
-
31
- * installed husky npm module globally ([e08f5a7](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/e08f5a7850d0743137c26addf694f586c8c8ee74))
32
- * updated node from 20 to 22 ([e592f6e](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/e592f6e93fc6554227f8902c8c1c21a3564a32ce))
33
-
34
- ### 1.7.0-beta.1 (2025-05-14)
35
-
36
- #### Features
37
-
38
- * installed husky npm module globally ([e08f5a7](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/e08f5a7850d0743137c26addf694f586c8c8ee74))
39
- * updated node from 20 to 22 ([e592f6e](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/e592f6e93fc6554227f8902c8c1c21a3564a32ce))
40
-
41
- ### 1.6.0 (2024-10-22)
42
-
43
- #### Features
44
-
45
- * own global node_modules folder so local modules can be linked ([82f84fa](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/82f84faa5dfa7c009458bec4fe3a9f2b437c34bf))
46
-
47
- ### 1.5.2 (2024-10-08)
48
-
49
- #### Bug Fixes
50
-
51
- * rclone in alpine image and aws sdk back in full image as rclone used for s3 content ([9e68463](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/9e684631bb83c105aa9e5407e8fee30a788309cd))
52
-
53
- ### 1.5.1 (2024-10-07)
54
-
55
- #### Bug Fixes
56
-
57
- * move aws from full image to alpine now that s3 content requests are supported ([a947817](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/a94781756ea482545b63018e72ab30ce25727af9))
58
-
59
- ### 1.5.0 (2024-10-01)
60
-
61
- #### Features
62
-
63
- * commit into lab-env and create pull request against development on publish ([22e9c66](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/22e9c666dff1e6453090da472a6cd4f0b89c6fbb))
64
-
65
- #### Bug Fixes
66
-
67
- * close source branch by default on pull request ([5208373](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/5208373822272c648a547f9b328720cb4fdf9bd4))
68
-
69
- ### 1.4.2 (2024-10-01)
70
-
71
- #### Bug Fixes
72
-
73
- * trigger ci ([301d679](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/301d6795162f0bf8941a3b9413a30092a3e8bf21))
74
-
75
- ### 1.4.1 (2024-07-17)
76
- * [fix] set global var for git across file system so git avail in mounted volumes i.e node_modules
77
-
78
- ### 1.4.0 (2024-06-04)
79
- * [feat] bumped node from 18 to 20
80
-
81
- ### 1.3.3 (2024-02-09)
82
- * [fix] symlink wine64 now htat wine is the default global command but electron expects wine64
83
-
84
- ### 1.3.2 (2024-01-24)
85
- * [fix] install latest eb cli and use node images python rather than pyenv
86
-
87
- ### 1.3.1 (2024-01-22)
88
- * [fix] rebuild of image to get the latest chromium version to fix new puppeteer headless mode
89
-
90
- ### 1.3.0 (2023-03-17)
91
- * [feat] node user is now added to www-data group for easier file permission management
92
- * [fix] disable npm message about update being available
93
-
94
- ### 1.2.2 (2023-02-25)
95
- * [fix] set BRANCH and CI_COMMIT_REF_NAME env variables in container
96
- * [fix] installed git-branch to fetch the current branch for deployment targets
97
- * [refactor] moved global node module symlinking to alpine image for future use
98
-
99
- ### 1.2.1 (2023-02-25)
100
- * [fix] install eb cli into root of image rather than root user directory
101
- * [perf] dont recurse and dont change group of node_modules to speed up command
102
- * [refactor] set node git flag without switching user directly in dockerfile
103
-
104
- ### 1.1.4 (2023-02-23)
105
- * [Fix] Installed missing are-you-es5 global npm module
106
- * [Fix] Installed missing check-dependencies global npm module
107
-
108
- ### 1.1.3 (2023-02-23)
109
- * [Fix] Switch to ENV for $PATH updates to avoid shell profile loading issues
110
- * [Fix] Moved chromium to alpine image as its needed for svg tasks and testing
111
-
112
- ### 1.1.2 (2023-02-22)
113
- * [Fix] cd into $PWD after su command or we'll start in users home directory
114
-
115
- ### 1.1.1 (2023-02-22)
116
- * [Fix] Use -l login flag for su command for both non interactive and interactive shells
117
- * [Fix] Switch $PATH writes to .profile so they are executed on non interactive shells
118
-
119
- ### 1.1.0 (2023-02-22)
120
- * [Feature] Watertight now baked into image so not needed in package.json of projects
121
- * [Fix] lftp installed in alpine image as it's needed for content tasks
122
-
123
- ### 1.0.0 (2023-02-21)
124
- * [Misc] initial commit
package/core/1/Dockerfile DELETED
@@ -1,113 +0,0 @@
1
- #####
2
- # Alpine image
3
- #####
4
-
5
- FROM node:22 AS alpine
6
-
7
- LABEL org.opencontainers.image.authors="Mike Mellor <mike.mellor@avalerehealth.com>"
8
-
9
- ARG TARGETARCH
10
-
11
- WORKDIR /app
12
-
13
- EXPOSE 3000
14
- EXPOSE 3001
15
-
16
- # Get latest apt-get
17
- RUN apt-get update
18
-
19
- # Update npm to latest
20
- RUN npm install -g npm@latest
21
-
22
- # Install dart sass vm (arch switch)
23
- RUN curl -L -o /sass.tar.gz https://github.com/sass/dart-sass/releases/download/1.57.1/dart-sass-1.57.1-linux-$(if [ "$TARGETARCH" = "arm64" ]; then echo 'arm64'; else echo 'x64'; fi).tar.gz
24
- RUN tar -xf /sass.tar.gz -C /
25
- ENV PATH="${PATH}:/dart-sass/"
26
- RUN rm -rf /sass.tar.gz
27
-
28
- # Set safe directory to remove intel errors when running git rev-parse
29
- RUN su node -c "git config --global --add safe.directory /app"
30
-
31
- # Also set global git flag for allowing access across filesystems for mounted node_modules dir
32
- ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
33
-
34
- # Disable npm message about updates being available
35
- RUN su node -c "npm config set update-notifier false"
36
-
37
- # Add node user to www-data group
38
- RUN usermod -a -G www-data node
39
-
40
- # Install lftp
41
- RUN apt-get install -y lftp
42
-
43
- # Install chromium
44
- RUN apt-get install -y chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends
45
- # Stop Puppeteer downloading browsers during npm install
46
- ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
47
- ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
48
-
49
- # Install package.json checker
50
- RUN npm install check-dependencies -g
51
-
52
- # Install node_modules checker
53
- RUN npm install are-you-es5 -g
54
-
55
- # Install git branch fetcher
56
- RUN npm install git-branch -g
57
-
58
- # Link root global node_modules to ~/.node_modules
59
- RUN ln -s /usr/local/lib/node_modules/ /home/node/.node_modules
60
-
61
- # Install rclone
62
- RUN curl https://rclone.org/install.sh | bash
63
-
64
- # Cleanup apt-get install folders
65
- RUN apt-get clean && \
66
- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
67
-
68
- COPY entrypoint.sh /bin/entrypoint.sh
69
- RUN chmod +x /bin/entrypoint.sh
70
- ENTRYPOINT ["/bin/entrypoint.sh"]
71
-
72
- #####
73
- # Full image
74
- #####
75
-
76
- FROM alpine AS full
77
-
78
- # Get latest apt-get
79
- RUN apt-get update
80
-
81
- # Install ghostscript
82
- RUN apt-get install -y ghostscript
83
-
84
- # Install zip
85
- RUN apt-get install zip
86
-
87
- # Install AWS Elastic Beanstalk cli
88
- ENV PATH="${PATH}:/.ebcli-virtual-env/executables"
89
- RUN apt-get -y install python-is-python3 python3-pip && \
90
- pip install virtualenv --break-system-packages && \
91
- git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git ~/aws-eb && \
92
- python ~/aws-eb/scripts/ebcli_installer.py --location / && \
93
- rm -rf ~/aws-eb
94
-
95
- # Install AWS-CLI@2 (arch switch)
96
- RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(if [ "$TARGETARCH" = "arm64" ]; then echo 'aarch64'; else echo 'x86_64'; fi).zip" -o "awscliv2.zip"
97
- RUN unzip awscliv2.zip
98
- RUN ./aws/install
99
- RUN rm -rf ./aws && rm -rf awscliv2.zip
100
-
101
- # Update electron globally
102
- RUN npm install -g electron-packager@latest
103
-
104
- # Install wine64
105
- RUN apt-get install -y wine64 && \
106
- ln -s /usr/bin/wine /usr/bin/wine64
107
-
108
- # Install watertight
109
- RUN --mount=type=ssh npm install -g git+ssh://git@bitbucket.org/fishawackdigital/watertight-node-auto.git#v6.0.0
110
-
111
- # Cleanup apt-get install folders
112
- RUN apt-get clean && \
113
- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
package/core/1/README.md DELETED
@@ -1,9 +0,0 @@
1
- ## Background
2
-
3
- ### What
4
-
5
- The image used for core@8 and above.
6
-
7
- ### Why
8
-
9
- Allows us to automate the local developer & CI environments.