create abc-toolbox docker image
This commit is contained in:
15
dockerfiles/tasks/abc-toolbox/Dockerfile
Normal file
15
dockerfiles/tasks/abc-toolbox/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#FROM ubuntu:21.04
|
||||||
|
#RUN apt-get update && ap-get install build-essential
|
||||||
|
FROM alpine/git
|
||||||
|
RUN apk add --update alpine-sdk
|
||||||
|
|
||||||
|
RUN mkdir -p /project
|
||||||
|
WORKDIR /project
|
||||||
|
RUN git clone https://git.xai-corp.net/richard/abcmidi.git /project
|
||||||
|
|
||||||
|
RUN make all install
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
0
dockerfiles/tasks/abc-toolbox/cli/.bash_cli
Normal file
0
dockerfiles/tasks/abc-toolbox/cli/.bash_cli
Normal file
49
dockerfiles/tasks/abc-toolbox/cli/build
Executable file
49
dockerfiles/tasks/abc-toolbox/cli/build
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
LOCAL_IMAGE=xaicorp/abc-toolbox
|
||||||
|
TAG=latest
|
||||||
|
REMOTE_IMAGE=dkregistry.xai-corp.net:5000/${LOCAL_IMAGE}:${TAG}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
docker build --rm -f Dockerfile -t ${LOCAL_IMAGE} .
|
||||||
|
}
|
||||||
|
|
||||||
|
build_test() {
|
||||||
|
echo testing the image
|
||||||
|
docker run --rm $LOCAL_IMAGE abc2midi -ver | grep 'abc2midi'
|
||||||
|
|
||||||
|
#docker run --rm -it -v $(pwd):/opt xaicorp/abc-toolbox abc2midi /opt/tests/abc1.abc -cvt
|
||||||
|
}
|
||||||
|
|
||||||
|
build_deploy() {
|
||||||
|
echo push to registry
|
||||||
|
|
||||||
|
docker tag $LOCAL_IMAGE $REMOTE_IMAGE
|
||||||
|
docker push $REMOTE_IMAGE
|
||||||
|
}
|
||||||
|
|
||||||
|
print_usage() {
|
||||||
|
printf "Usage: %s: [-b] [-t] [-d] \n" "$0"
|
||||||
|
echo -b build
|
||||||
|
echo -t test
|
||||||
|
echo -d push to registry
|
||||||
|
echo -h help
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
######
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
build && build_test && build_deploy
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
while getopts btdh name
|
||||||
|
do
|
||||||
|
case $name in
|
||||||
|
b) build;;
|
||||||
|
t) build_test;;
|
||||||
|
d) build_deploy;;
|
||||||
|
*) print_usage;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
3
dockerfiles/tasks/abc-toolbox/cli/build.help
Normal file
3
dockerfiles/tasks/abc-toolbox/cli/build.help
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ARGS - The arguments you wish to provide to this command
|
||||||
|
|
||||||
|
TODO: Fill out the help information for this command.
|
||||||
1
dockerfiles/tasks/abc-toolbox/cli/build.usage
Normal file
1
dockerfiles/tasks/abc-toolbox/cli/build.usage
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ARGS...
|
||||||
4
dockerfiles/tasks/abc-toolbox/entrypoint.sh
Executable file
4
dockerfiles/tasks/abc-toolbox/entrypoint.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec $@
|
||||||
15
dockerfiles/tasks/abc-toolbox/tests/abc1.abc
Normal file
15
dockerfiles/tasks/abc-toolbox/tests/abc1.abc
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
X: 1
|
||||||
|
T: Struan And Frazer's
|
||||||
|
Z: Josh
|
||||||
|
S: https://thesession.org/tunes/14951#setting27622
|
||||||
|
R: reel
|
||||||
|
M: 4/4
|
||||||
|
L: 1/8
|
||||||
|
K: Bmin
|
||||||
|
|: f2 ef BBdB | feef Bffd | ecce AeeA | ccAe cdec |
|
||||||
|
f2 ef BBdB | feef Bffd | ecce Aeec | effA B2 de :|
|
||||||
|
fBBB aBBB | fBBa BBfd | ecce AeeA | ccBc ABce |
|
||||||
|
fBBB aBBB | fBBa BBfd | ecce Aeec | effA B2 de ||
|
||||||
|
fBBa BBfB | fBBa BBfd | ecce AeeA | ccBc ABce |
|
||||||
|
fBBa BBfB | fBBa BBfd | ecce Aeec | effA B2 de |]
|
||||||
|
|
||||||
BIN
dockerfiles/tasks/abc-toolbox/tests/abc11.mid
Normal file
BIN
dockerfiles/tasks/abc-toolbox/tests/abc11.mid
Normal file
Binary file not shown.
Reference in New Issue
Block a user