Browse Source

Add docker build from scratch

Add docker test function in makefile
develop
Matthew Faltys 7 years ago
parent
commit
6cdd33c23d
  1. 11
      Makefile
  2. 8
      deps/Dockerfile

11
Makefile

@ -22,6 +22,7 @@ docker: stat
cp bin/lorebot stage.tmp/
cp deps/rootfs.tar.gz stage.tmp/
cp deps/Dockerfile stage.tmp/
cp deps/redis.conf stage.tmp/
chmod +x deps/run.sh
cp deps/run.sh stage.tmp/
cp config.gcfg stage.tmp/
@ -43,6 +44,16 @@ aci: stat
mv lorebot.aci ../
@echo "lorebot.aci built"
test_docker:
mkdir -p /tmp/lorebot/redis/
touch /tmp/lorebot/dump.rdb
cp .auth /tmp/lorebot/
sudo docker run \
-it \
-v /tmp/lorebot/redis:/redisbackup:rw \
-v /tmp/lorebot/.auth:/.auth:ro \
smpldbot
test_aci:
mkdir -p /tmp/lorebot/redis/
touch /tmp/lorebot/dump.rdb

8
deps/Dockerfile vendored

@ -1,7 +1,9 @@
FROM alpine
FROM scratch
RUN apk --update add ca-certificates redis
RUN mkdir /redisbackup/
#RUN apk --update add ca-certificates redis
#RUN mkdir /redisbackup/
ADD rootfs.tar.gz /
COPY redis.conf /
COPY config.gcfg /
COPY lorebot /
COPY run.sh /

Loading…
Cancel
Save