FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-lambda/base/dump-node12x.js at build-python3.8 · greencloudcomputing/docker-lambda · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
greencloudcomputing
/
docker-lambda
Public
forked from
lambci/docker-lambda
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-lambda
/
base
/
dump-node12x.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (30 loc) · 1.12 KB
Breadcrumbs
docker-lambda
/
base
/
dump-node12x.js
Copy path
File metadata and controls
38 lines (30 loc) · 1.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const
fs
=
require
(
'fs'
)
const
{
execSync
}
=
require
(
'child_process'
)
const
AWS
=
require
(
'aws-sdk'
)
const
s3
=
new
AWS
.
S3
(
)
// Depends on tar-find-layer for the tar/find/xargs binaries
exports
.
handler
=
async
(
event
,
context
)
=>
{
const
execOpts
=
{
stdio
:
'inherit'
,
maxBuffer
:
16
*
1024
*
1024
}
let
filename
=
'nodejs12.x.tgz'
let
cmd
=
'tar -cpzf /tmp/'
+
filename
+
' --numeric-owner --ignore-failed-read /var/runtime /var/lang /var/rapid'
execSync
(
cmd
,
execOpts
)
console
.
log
(
'Zipping done! Uploading...'
)
let
data
=
await
s3
.
upload
(
{
Bucket
:
'lambci'
,
Key
:
'fs/'
+
filename
,
Body
:
fs
.
createReadStream
(
'/tmp/'
+
filename
)
,
ACL
:
'public-read'
,
}
)
.
promise
(
)
console
.
log
(
'Uploading done!'
)
console
.
log
(
process
.
execPath
)
console
.
log
(
process
.
execArgv
)
console
.
log
(
process
.
argv
)
console
.
log
(
process
.
cwd
(
)
)
console
.
log
(
__filename
)
console
.
log
(
process
.
env
)
execSync
(
'echo /proc/1/environ; xargs -n 1 -0 < /proc/1/environ'
,
execOpts
)
execSync
(
"bash -O extglob -c 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done'"
,
execOpts
)
console
.
log
(
context
)
return
data
}
Back
|
FazBrowse Home
|
New Git URL