回答編集履歴

2

Add test

2020/07/06 16:08

投稿

y_shinoda
y_shinoda

スコア3272

test CHANGED
@@ -38,4 +38,78 @@
38
38
 
39
39
 
40
40
 
41
+ 動作確認:
42
+
43
+
44
+
45
+ ```console
46
+
47
+ $ docker build . --tag futureys/ruby-node:latest
48
+
49
+
50
+
51
+ --- 略 ---
52
+
53
+
54
+
55
+ Step 4/4 : RUN apk --no-cache add nodejs-npm
56
+
57
+ ---> Running in 5b8d09e7147a
58
+
59
+ fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
60
+
61
+ fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
62
+
63
+ (1/9) Installing c-ares (1.13.0-r0)
64
+
65
+ (2/9) Installing libcrypto1.0 (1.0.2t-r0)
66
+
67
+ (3/9) Installing libgcc (6.4.0-r5)
68
+
69
+ (4/9) Installing http-parser (2.7.1-r1)
70
+
71
+ (5/9) Installing libssl1.0 (1.0.2t-r0)
72
+
73
+ (6/9) Installing libstdc++ (6.4.0-r5)
74
+
75
+ (7/9) Installing libuv (1.17.0-r0)
76
+
77
+ (8/9) Installing nodejs (8.9.3-r1)
78
+
79
+ (9/9) Installing nodejs-npm (8.9.3-r1)
80
+
81
+ Executing busybox-1.27.2-r11.trigger
82
+
83
+ OK: 71 MiB in 39 packages
84
+
85
+ Removing intermediate container 5b8d09e7147a
86
+
87
+ ---> 95bca61cdf89
88
+
89
+ Successfully built 95bca61cdf89
90
+
91
+ Successfully tagged futureys/ruby-node:latest
92
+
93
+ SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
94
+
95
+
96
+
97
+ $ docker run --rm -it futureys/ruby-node:latest
98
+
99
+ irb(main):001:0> npm --version
100
+
101
+ Traceback (most recent call last):
102
+
103
+ 2: from /usr/local/bin/irb:11:in `<main>'
104
+
105
+ 1: from (irb):1
106
+
107
+ NameError (undefined local variable or method `version' for main:Object)
108
+
109
+ irb(main):002:0>
110
+
111
+ ```
112
+
113
+
114
+
41
115
  参考: [Answer: How to install npm in alpine linux](https://superuser.com/a/1187246/1167741)

1

Fix Dockerfile

2020/07/06 16:08

投稿

y_shinoda
y_shinoda

スコア3272

test CHANGED
@@ -10,10 +10,32 @@
10
10
 
11
11
  ```dockerfile
12
12
 
13
+ FROM ruby:2.5.1-alpine as builder
14
+
15
+
16
+
17
+ ENV ENTRYKIT_VERSION 0.4.0
18
+
19
+
20
+
21
+ RUN wget https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
22
+
23
+ && tar -xvzf entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
24
+
25
+ && rm entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
26
+
27
+ && mv entrykit /bin/entrykit \
28
+
29
+ && chmod +x /bin/entrykit \
30
+
31
+ && entrykit --symlink
32
+
33
+ # 次の行を追加します
34
+
13
- RUN apk add --update npm
35
+ RUN apk --no-cache add nodejs-npm
14
36
 
15
37
  ```
16
38
 
17
39
 
18
40
 
19
- 参考: [Answer: How to install npm in alpine linux](https://superuser.com/a/1424979/1167741)
41
+ 参考: [Answer: How to install npm in alpine linux](https://superuser.com/a/1187246/1167741)