質問編集履歴
4
質問文を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -106,35 +106,17 @@
|
|
106
106
|
|
107
107
|
Serverless: Excluding development dependencies...
|
108
108
|
|
109
|
-
|
110
|
-
|
111
|
-
Serverless Error ----------------------------------------
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
Encountered error during executing: docker build -t serverless-laravel-dev:laravel -f /var/www/hogehoge/Dockerfile ./
|
116
|
-
|
117
|
-
Output of the command:
|
118
|
-
|
119
|
-
|
109
|
+
Sending build context to Docker daemon 290.4MB
|
120
|
-
|
110
|
+
|
121
|
-
|
111
|
+
Step 1/8 : FROM bref/php-80-fpm
|
122
|
-
|
112
|
+
|
123
|
-
|
113
|
+
---> 540bd4e4f016
|
124
|
-
|
114
|
+
|
125
|
-
|
115
|
+
Step 2/8 : COPY . /var/task
|
126
|
-
|
116
|
+
|
127
|
-
|
117
|
+
---> 163363282de0
|
128
|
-
|
118
|
+
|
129
|
-
|
119
|
+
Step 3/8 : RUN yum -y install aws-cli curl unzip
|
130
|
-
|
131
|
-
---> Running in ed00480f39c7
|
132
|
-
|
133
|
-
Loaded plugins: ovl
|
134
|
-
|
135
|
-
Resolving Dependencies
|
136
|
-
|
137
|
-
--> Running transaction check
|
138
120
|
|
139
121
|
|
140
122
|
|
@@ -142,132 +124,90 @@
|
|
142
124
|
|
143
125
|
|
144
126
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
===
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
a
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
lib
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
lib
|
184
|
-
|
185
|
-
p
|
186
|
-
|
187
|
-
p
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
p
|
192
|
-
|
193
|
-
p
|
194
|
-
|
195
|
-
p
|
196
|
-
|
197
|
-
p
|
198
|
-
|
199
|
-
p
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
Total download size: 13 M
|
236
|
-
|
237
|
-
Is this ok [y/d/N]: Exiting on user command
|
238
|
-
|
239
|
-
Your transaction was saved, rerun it with:
|
240
|
-
|
241
|
-
yum load-transaction /tmp/yum_save_tx.2021-10-19.09-48.ho4HVP.yumtx
|
242
|
-
|
243
|
-
The command '/bin/sh -c yum install aws-cli curl unzip' returned a non-zero code: 1
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
Get Support --------------------------------------------
|
250
|
-
|
251
|
-
Docs: docs.serverless.com
|
252
|
-
|
253
|
-
Bugs: github.com/serverless/serverless/issues
|
254
|
-
|
255
|
-
Issues: forum.serverless.com
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
Your Environment Information ---------------------------
|
260
|
-
|
261
|
-
Operating System: linux
|
262
|
-
|
263
|
-
Node Version: 10.19.0
|
264
|
-
|
265
|
-
Framework Version: 2.56.0
|
266
|
-
|
267
|
-
Plugin Version: 5.4.4
|
268
|
-
|
269
|
-
SDK Version: 4.3.0
|
270
|
-
|
271
|
-
Components Version: 3.16.0
|
272
|
-
|
273
|
-
```
|
127
|
+
Step 4/8 : RUN mkdir -p /opt
|
128
|
+
|
129
|
+
---> Running in c603553f2e55
|
130
|
+
|
131
|
+
Removing intermediate container c603553f2e55
|
132
|
+
|
133
|
+
---> c35462e37fd8
|
134
|
+
|
135
|
+
Step 5/8 : RUN curl $(AWS_DEFAULT_REGION=ap-northeast-1 AWS_ACCESS_KEY_ID=AKIA3DMDSKW5JOBBUJUV AWS_SECRET_ACCESS_KEY=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 aws lambda get-layer-version-by-arn --arn arn:aws:lambda:ap-northeast-1:763169494458:layer:php-gd:4 --query 'Content.Location' --output text) --output layer.zip
|
136
|
+
|
137
|
+
---> Running in b13050df8a81
|
138
|
+
|
139
|
+
% Total % Received % Xferd Average Speed Time Time Time Current
|
140
|
+
|
141
|
+
Dload Upload Total Spent Left Speed
|
142
|
+
|
143
|
+
100 686k 100 686k 0 0 1511k 0 --:--:-- --:--:-- --:--:-- 1508k
|
144
|
+
|
145
|
+
Removing intermediate container b13050df8a81
|
146
|
+
|
147
|
+
---> 2060c52ff462
|
148
|
+
|
149
|
+
Step 6/8 : RUN unzip layer.zip -d /opt
|
150
|
+
|
151
|
+
---> Running in 826814675f5d
|
152
|
+
|
153
|
+
Archive: layer.zip
|
154
|
+
|
155
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/gd.so
|
156
|
+
|
157
|
+
creating: /opt/bref/lib/x86_64-linux-gnu/
|
158
|
+
|
159
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgdbm_compat.so.4.0.0
|
160
|
+
|
161
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgdbm.so.6.0.0
|
162
|
+
|
163
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgd.so.3.0.8
|
164
|
+
|
165
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgdbm_compat.so.4
|
166
|
+
|
167
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgd.so.3
|
168
|
+
|
169
|
+
inflating: /opt/bref/lib/x86_64-linux-gnu/libgdbm.so.6
|
170
|
+
|
171
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgdbm_compat.so.4.0.0
|
172
|
+
|
173
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgdbm.so.6.0.0
|
174
|
+
|
175
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgd.so.3.0.8
|
176
|
+
|
177
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgdbm_compat.so.4
|
178
|
+
|
179
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgd.so.3
|
180
|
+
|
181
|
+
inflating: /opt/bref/lib/php/extensions/no-debug-non-zts-20200930/libgdbm.so.6
|
182
|
+
|
183
|
+
Removing intermediate container 826814675f5d
|
184
|
+
|
185
|
+
---> 43589f96b25d
|
186
|
+
|
187
|
+
Step 7/8 : RUN rm layer.zip
|
188
|
+
|
189
|
+
---> Running in 8cd540fdb6d9
|
190
|
+
|
191
|
+
Removing intermediate container 8cd540fdb6d9
|
192
|
+
|
193
|
+
---> 94e4b766402a
|
194
|
+
|
195
|
+
Step 8/8 : CMD [ "public/index.php" ]
|
196
|
+
|
197
|
+
---> Running in fbf556426956
|
198
|
+
|
199
|
+
Removing intermediate container fbf556426956
|
200
|
+
|
201
|
+
---> 2f91c8be01c0
|
202
|
+
|
203
|
+
Successfully built 2f91c8be01c0
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
↑のログのStep6にてファイルが展開されていることが分かる。
|
208
|
+
|
209
|
+
また実際に該当ディレクトリにファイルがあるか確認したところ存在しました。
|
210
|
+
|
211
|
+
が、phpinfo()で確認したところ、gd は設定されていないとのこと。
|
212
|
+
|
213
|
+
なので、追加したレイヤー(gd レイヤー)が、正しいものではないようだ・・・
|
3
質問文を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
COPY . /var/task
|
74
74
|
|
75
|
-
RUN yum install aws-cli curl unzip
|
75
|
+
RUN yum -y install aws-cli curl unzip
|
76
76
|
|
77
77
|
RUN mkdir -p /opt
|
78
78
|
|
2
質問文を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
RUN mkdir -p /opt
|
78
78
|
|
79
|
-
RUN curl $(aws lambda get-layer-version-by-arn --arn arn:aws:lambda:hogehgoe:php-gd:
|
79
|
+
RUN curl $(AWS_DEFAULT_REGION=ap-northeast-1 AWS_ACCESS_KEY_ID=xxxxxx AWS_SECRET_ACCESS_KEY=xxxxxx aws lambda get-layer-version-by-arn --arn arn:aws:lambda:hogehgoe:php-gd:1 --query 'Content.Location' --output text) --output layer.zip
|
80
80
|
|
81
81
|
RUN unzip layer.zip -d /opt
|
82
82
|
|
1
質問文を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
COPY . /var/task
|
74
74
|
|
75
|
-
RUN
|
75
|
+
RUN yum install aws-cli curl unzip
|
76
76
|
|
77
77
|
RUN mkdir -p /opt
|
78
78
|
|
@@ -85,3 +85,189 @@
|
|
85
85
|
CMD [ "public/index.php" ]
|
86
86
|
|
87
87
|
```
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
# 実行後
|
92
|
+
|
93
|
+
```ここに言語を入力
|
94
|
+
|
95
|
+
# sls deploy --stage dev
|
96
|
+
|
97
|
+
Serverless: Configuration warning at 'disabledDeprecations[0]': should match pattern "^[A-Z0-9_]+$"
|
98
|
+
|
99
|
+
Serverless:
|
100
|
+
|
101
|
+
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
|
102
|
+
|
103
|
+
Serverless:
|
104
|
+
|
105
|
+
Serverless: Packaging service...
|
106
|
+
|
107
|
+
Serverless: Excluding development dependencies...
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
Serverless Error ----------------------------------------
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
Encountered error during executing: docker build -t serverless-laravel-dev:laravel -f /var/www/hogehoge/Dockerfile ./
|
116
|
+
|
117
|
+
Output of the command:
|
118
|
+
|
119
|
+
Sending build context to Docker daemon 290.4MB
|
120
|
+
|
121
|
+
Step 1/8 : FROM bref/php-80-fpm
|
122
|
+
|
123
|
+
---> 540bd4e4f016
|
124
|
+
|
125
|
+
Step 2/8 : COPY . /var/task
|
126
|
+
|
127
|
+
---> 9e340778075b
|
128
|
+
|
129
|
+
Step 3/8 : RUN yum install aws-cli curl unzip
|
130
|
+
|
131
|
+
---> Running in ed00480f39c7
|
132
|
+
|
133
|
+
Loaded plugins: ovl
|
134
|
+
|
135
|
+
Resolving Dependencies
|
136
|
+
|
137
|
+
--> Running transaction check
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
~~省略
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
Dependencies Resolved
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
================================================================================
|
150
|
+
|
151
|
+
Package Arch Version Repository Size
|
152
|
+
|
153
|
+
================================================================================
|
154
|
+
|
155
|
+
Installing:
|
156
|
+
|
157
|
+
awscli noarch 1.18.147-1.amzn2.0.1 amzn2-core 2.1 M
|
158
|
+
|
159
|
+
unzip x86_64 6.0-43.amzn2 amzn2-core 179 k
|
160
|
+
|
161
|
+
Updating:
|
162
|
+
|
163
|
+
curl x86_64 7.76.1-7.amzn2.0.2 amzn2-core 345 k
|
164
|
+
|
165
|
+
Installing for dependencies:
|
166
|
+
|
167
|
+
PyYAML x86_64 3.10-11.amzn2.0.2 amzn2-core 181 k
|
168
|
+
|
169
|
+
freetype x86_64 2.8-14.amzn2.1 amzn2-core 373 k
|
170
|
+
|
171
|
+
groff-base x86_64 1.22.2-8.amzn2.0.2 amzn2-core 948 k
|
172
|
+
|
173
|
+
jbigkit-libs x86_64 2.0-11.amzn2.0.2 amzn2-core 47 k
|
174
|
+
|
175
|
+
libjpeg-turbo x86_64 2.0.90-2.amzn2.0.1 amzn2-core 170 k
|
176
|
+
|
177
|
+
libpng x86_64 2:1.5.13-8.amzn2 amzn2-core 212 k
|
178
|
+
|
179
|
+
libtiff x86_64 4.0.3-35.amzn2 amzn2-core 173 k
|
180
|
+
|
181
|
+
libwebp x86_64 0.3.0-10.amzn2 amzn2-core 170 k
|
182
|
+
|
183
|
+
libyaml x86_64 0.1.4-11.amzn2.0.2 amzn2-core 53 k
|
184
|
+
|
185
|
+
python-backports x86_64 1.0-8.amzn2.0.2 amzn2-core 5.9 k
|
186
|
+
|
187
|
+
python-backports-ssl_match_hostname
|
188
|
+
|
189
|
+
noarch 3.5.0.1-1.amzn2 amzn2-core 13 k
|
190
|
+
|
191
|
+
python-colorama noarch 0.3.2-3.amzn2 amzn2-core 25 k
|
192
|
+
|
193
|
+
python-docutils noarch 0.12-0.2.20140510svn7747.amzn2 amzn2-core 1.5 M
|
194
|
+
|
195
|
+
python-ipaddress noarch 1.0.16-2.amzn2 amzn2-core 34 k
|
196
|
+
|
197
|
+
python-pillow x86_64 2.0.0-21.gitd1c6db8.amzn2.0.1 amzn2-core 440 k
|
198
|
+
|
199
|
+
python-six noarch 1.9.0-2.amzn2 amzn2-core 29 k
|
200
|
+
|
201
|
+
python-urllib3 noarch 1.25.9-1.amzn2.0.2 amzn2-core 191 k
|
202
|
+
|
203
|
+
python2-botocore noarch 1.18.6-1.amzn2.0.1 amzn2-core 4.4 M
|
204
|
+
|
205
|
+
python2-dateutil noarch 1:2.6.0-3.amzn2.0.1 amzn2-core 245 k
|
206
|
+
|
207
|
+
python2-futures noarch 3.0.5-1.amzn2 amzn2-core 27 k
|
208
|
+
|
209
|
+
python2-jmespath noarch 0.9.3-1.amzn2.0.1 amzn2-core 42 k
|
210
|
+
|
211
|
+
python2-pyasn1 noarch 0.1.9-7.amzn2.0.1 amzn2-core 100 k
|
212
|
+
|
213
|
+
python2-rsa noarch 3.4.1-1.amzn2.0.1 amzn2-core 68 k
|
214
|
+
|
215
|
+
python2-s3transfer noarch 0.3.3-1.amzn2.0.1 amzn2-core 104 k
|
216
|
+
|
217
|
+
python2-setuptools noarch 41.2.0-4.amzn2.0.2 amzn2-core 657 k
|
218
|
+
|
219
|
+
Updating for dependencies:
|
220
|
+
|
221
|
+
libcurl x86_64 7.76.1-7.amzn2.0.2 amzn2-core 314 k
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
Transaction Summary
|
226
|
+
|
227
|
+
================================================================================
|
228
|
+
|
229
|
+
Install 2 Packages (+25 Dependent packages)
|
230
|
+
|
231
|
+
Upgrade 1 Package (+ 1 Dependent package)
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
Total download size: 13 M
|
236
|
+
|
237
|
+
Is this ok [y/d/N]: Exiting on user command
|
238
|
+
|
239
|
+
Your transaction was saved, rerun it with:
|
240
|
+
|
241
|
+
yum load-transaction /tmp/yum_save_tx.2021-10-19.09-48.ho4HVP.yumtx
|
242
|
+
|
243
|
+
The command '/bin/sh -c yum install aws-cli curl unzip' returned a non-zero code: 1
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
Get Support --------------------------------------------
|
250
|
+
|
251
|
+
Docs: docs.serverless.com
|
252
|
+
|
253
|
+
Bugs: github.com/serverless/serverless/issues
|
254
|
+
|
255
|
+
Issues: forum.serverless.com
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
Your Environment Information ---------------------------
|
260
|
+
|
261
|
+
Operating System: linux
|
262
|
+
|
263
|
+
Node Version: 10.19.0
|
264
|
+
|
265
|
+
Framework Version: 2.56.0
|
266
|
+
|
267
|
+
Plugin Version: 5.4.4
|
268
|
+
|
269
|
+
SDK Version: 4.3.0
|
270
|
+
|
271
|
+
Components Version: 3.16.0
|
272
|
+
|
273
|
+
```
|