forked from NodeOS/NodeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerBuild
More file actions
executable file
·50 lines (33 loc) · 1.09 KB
/
dockerBuild
File metadata and controls
executable file
·50 lines (33 loc) · 1.09 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
# NodeOS
#
# Copyright (c) 2013-2017 Jacob Groundwater, Jesús Leganés-Combarro 'piranna'
# and other contributors
#
# MIT License
set -o pipefail
BLD=$(tput bold)
CLR="\e[0m"
GRN="\e[32m"
GRY="\e[90m"
WHT="\e[37m"
CONTEXT=out/latest
cp resources/Dockerfile $CONTEXT || exit 10
cp resources/Dockerfile-initramfs $CONTEXT || exit 12
cd $CONTEXT || exit 20
ORG=nodeos
docker import barebones.tar.gz $ORG/barebones || exit 30
docker build -t $ORG/initramfs -f Dockerfile-initramfs . || exit 31
#docker volume create --name $ORG/usersfs || exit 32
#cat usersfs.tar.gz | docker cp - $ORG/usersfs:/ || exit 33
docker build -t $ORG/nodeos . || exit 34
echo -e "${GRY}-----------------------------------------${CLR}"
echo -e "${GRN}${BLD}Success!${CLR}"
echo -e "${GRN}You just registered a custom NodeOS image${CLR}"
echo -e "${GRY}-----------------------------------------${CLR}"
echo
echo -e "- Interactively run your image with:"
echo -e "${WHT} npm start${CLR}"
echo
echo -e "- Share your creation with:"
echo -e "${WHT} docker push $ORG/nodeos${CLR}"