Compare commits
3 commits
c98dc674d5
...
1a43693d6a
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a43693d6a | |||
| 17ca2738d1 | |||
| 4bfc0a67e4 |
3 changed files with 39 additions and 0 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
honk.db*
|
||||
blob.db*
|
||||
./honk
|
||||
.git*
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM golang:1.19
|
||||
|
||||
RUN apt update && apt install -y libsqlite3-dev && rm -rf /var/cache/apt/*
|
||||
|
||||
RUN mkdir /honk-src
|
||||
WORKDIR /honk-src
|
||||
|
||||
COPY go.mod go.sum /honk-src/
|
||||
COPY . /honk-src/
|
||||
RUN go get && go mod vendor
|
||||
|
||||
|
||||
RUN make
|
||||
RUN mv ./honk /bin/honk
|
||||
|
||||
CMD ["/bin/honk", "-datadir", "/honk-data"]
|
||||
|
||||
COPY docker-entrypoint.sh /honk-src/docker-entrypoint.sh
|
||||
ENTRYPOINT ["/honk-src/docker-entrypoint.sh"]
|
||||
|
||||
15
docker-entrypoint.sh
Executable file
15
docker-entrypoint.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -r "/honk-data/honk.db" ]; then
|
||||
set -u
|
||||
(
|
||||
echo "$HONK_USERNAME"
|
||||
echo "$HONK_PASSWORD"
|
||||
echo "${HONK_LISTEN_ADDR:-"0.0.0.0:8080"}"
|
||||
echo "${HONK_SERVER_HOSTNAME}"
|
||||
) | honk -datadir "/honk-data" init
|
||||
set +u
|
||||
fi
|
||||
|
||||
exec $*
|
||||
|
||||
Loading…
Reference in a new issue