generator-reshow 0.17.74 → 0.17.76
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.
- package/generators/docker/index.js +1 -1
- package/generators/docker/templates/Dockerfile +4 -4
- package/generators/docker/templates/_circleci/config.yml +5 -2
- package/generators/docker/templates/bin/enter.sh +1 -1
- package/generators/docker/templates/compile.sh +11 -0
- package/generators/docker/templates/docker/{entrypoint.sh → sbin/entrypoint.sh} +1 -1
- package/generators/docker/templates/install-packages.sh +1 -0
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ module.exports = class extends YoGenerator {
|
|
|
26
26
|
* https://github.com/SBoudrias/Inquirer.js
|
|
27
27
|
*/
|
|
28
28
|
async prompting() {
|
|
29
|
-
const {
|
|
29
|
+
const { handleAnswers, promptChainAll } = YoHelper(this);
|
|
30
30
|
|
|
31
31
|
const prompts = [
|
|
32
32
|
...commonPrompt.mainName(this),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
ARG VERSION=${VERSION:-[VERSION]}
|
|
2
2
|
|
|
3
|
-
FROM alpine:3.
|
|
3
|
+
FROM alpine:3.18
|
|
4
4
|
|
|
5
5
|
ARG VERSION
|
|
6
6
|
|
|
7
7
|
# apk
|
|
8
8
|
COPY ./install-packages.sh /usr/local/bin/install-packages
|
|
9
9
|
RUN apk update && apk add bash bc \
|
|
10
|
-
&& INSTALL_VERSION=$VERSION install-packages \
|
|
10
|
+
&& INSTALL_VERSION=$VERSION INSTALL_TARGETPLATFORM=$TARGETPLATFORM install-packages \
|
|
11
11
|
&& rm /usr/local/bin/install-packages;
|
|
12
12
|
|
|
13
|
-
COPY ./docker/
|
|
14
|
-
ENTRYPOINT ["/entrypoint.sh"]
|
|
13
|
+
COPY ./docker/sbin /usr/local/sbin
|
|
14
|
+
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
|
|
15
15
|
CMD ["server"]
|
|
@@ -46,11 +46,14 @@ jobs:
|
|
|
46
46
|
steps:
|
|
47
47
|
- checkout
|
|
48
48
|
- setup_remote_docker:
|
|
49
|
-
version: 20.10.
|
|
49
|
+
version: 20.10.24
|
|
50
50
|
docker_layer_caching: true
|
|
51
51
|
- run:
|
|
52
52
|
name: Log time
|
|
53
53
|
command: date
|
|
54
|
+
- run:
|
|
55
|
+
name: Get Rate Limit
|
|
56
|
+
command: ./compile.sh rate
|
|
54
57
|
- run:
|
|
55
58
|
name: Gen Docker file
|
|
56
59
|
command: |
|
|
@@ -98,7 +101,7 @@ jobs:
|
|
|
98
101
|
./${BUILD_FOLDER}
|
|
99
102
|
./compile.sh updateDockerHubDesc
|
|
100
103
|
- run:
|
|
101
|
-
name: logout
|
|
104
|
+
name: logout
|
|
102
105
|
command: docker logout
|
|
103
106
|
|
|
104
107
|
workflows:
|
|
@@ -20,7 +20,7 @@ containerName=${localImage//\//-}-${pid}
|
|
|
20
20
|
echo $containerName
|
|
21
21
|
|
|
22
22
|
cli='env docker run --rm -it'
|
|
23
|
-
cli+=" -v $DIR/../docker/
|
|
23
|
+
cli+=" -v $DIR/../docker/sbin:/usr/local/sbin"
|
|
24
24
|
cli+=" -v $MY_PWD:$MY_PWD"
|
|
25
25
|
cli+=" -w $MY_PWD"
|
|
26
26
|
cli+=" --entrypoint sh"
|
|
@@ -74,6 +74,14 @@ updateDockerHubDesc() {
|
|
|
74
74
|
echo $RESULT
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
getRateLimit() {
|
|
78
|
+
# https://docs.docker.com/docker-hub/download-rate-limit/
|
|
79
|
+
token=$(curl -s --user "${DOCKER_LOGIN}:${DOCKER_PASSWORD}" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
|
|
80
|
+
curl -s -I \
|
|
81
|
+
-H "Authorization: Bearer $token" \
|
|
82
|
+
"https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" | grep "ratelimit-"
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
push() {
|
|
78
86
|
login
|
|
79
87
|
PUSH_VERSION=${1:-$VERSION}
|
|
@@ -147,6 +155,9 @@ case "$1" in
|
|
|
147
155
|
updateDockerHubDesc)
|
|
148
156
|
updateDockerHubDesc
|
|
149
157
|
;;
|
|
158
|
+
rate)
|
|
159
|
+
getRateLimit
|
|
160
|
+
;;
|
|
150
161
|
p)
|
|
151
162
|
push $2 $3
|
|
152
163
|
;;
|
package/package.json
CHANGED