File tree 7 files changed +558
-2
lines changed
7 files changed +558
-2
lines changed Original file line number Diff line number Diff line change
1
+ .idea /
Original file line number Diff line number Diff line change
1
+ FROM tianon/toybox:0.8.4
2
+
3
+ COPY peer-finder /tmp/scripts/peer-finder
4
+
5
+ COPY scripts /tmp/scripts
6
+ COPY init-script /init-script
7
+
8
+ ENTRYPOINT ["/init-script/run.sh" ]
Original file line number Diff line number Diff line change 178
178
APPENDIX: How to apply the Apache License to your work.
179
179
180
180
To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[] "
181
+ boilerplate notice, with the fields enclosed by brackets "{} "
182
182
replaced with your own identifying information. (Don't include
183
183
the brackets!) The text should be enclosed in the appropriate
184
184
comment syntax for the file format. We also recommend that a
185
185
file or class name and description of purpose be included on the
186
186
same "printed page" as the copyright notice for easier
187
187
identification within third-party archives.
188
188
189
- Copyright [ yyyy] [ name of copyright owner]
189
+ Copyright { yyyy} { name of copyright owner}
190
190
191
191
Licensed under the Apache License, Version 2.0 (the "License");
192
192
you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change
1
+ SHELL =/bin/bash -o pipefail
2
+
3
+ REGISTRY ?= kubedb
4
+ BIN := mysql-init
5
+ IMAGE := $(REGISTRY ) /$(BIN )
6
+ TAG := $(shell git describe --exact-match --abbrev=0 2>/dev/null || echo "")
7
+
8
+
9
+ .PHONY : push
10
+ push : container
11
+ docker push $(IMAGE ) :$(TAG )
12
+
13
+ .PHONY : container
14
+ container :
15
+ curl -fsSL -O https://github.com/kmodules/peer-finder/releases/download/v1.1.0/peer-finder-linux-amd64.tar.gz
16
+ tar -xzvf peer-finder-linux-amd64.tar.gz
17
+ mv peer-finder-linux-amd64 peer-finder
18
+ chmod +x peer-finder
19
+ chmod +x init-script/run.sh
20
+ find $$(pwd ) /scripts -type f -exec chmod +x {} \;
21
+ docker build --pull -t $(IMAGE ) :$(TAG ) .
22
+ rm peer-finder peer-finder-linux-amd64.tar.gz
23
+
24
+ .PHONY : version
25
+ version :
26
+ @echo ::set-output name=version::$(TAG )
27
+
28
+ .PHONY : fmt
29
+ fmt :
30
+ @find . -path ./vendor -prune -o -name ' *.sh' -exec shfmt -l -w -ci -i 4 {} \;
31
+
32
+ .PHONY : verify
33
+ verify : fmt
34
+ @if ! (git diff --exit-code HEAD); then \
35
+ echo " files are out of date, run make fmt" ; exit 1; \
36
+ fi
37
+
38
+ .PHONY : ci
39
+ ci : verify
40
+
41
+ # make and load docker image to kind cluster
42
+ .PHONY : push-to-kind
43
+ push-to-kind : container
44
+ @echo " Loading docker image into kind cluster...."
45
+ @kind load docker-image $(IMAGE ) :$(TAG )
46
+ @echo " Image has been pushed successfully into kind cluster."
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ rm -rf /var/lib/mysql/lost+found
4
+
5
+ cp /tmp/scripts/* /scripts
You can’t perform that action at this time.
0 commit comments