mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
Fix dockerfile and makefile
This commit is contained in:
parent
0a7b28caf5
commit
a59ad97e5e
2 changed files with 4 additions and 5 deletions
|
@ -31,7 +31,7 @@ ENV MAKE_ARGS=${MAKE_ARGS}
|
|||
|
||||
RUN --mount=type=cache,target="/go/pkg/mod" \
|
||||
--mount=type=cache,target="/root/.cache/go-build" \
|
||||
make ${MAKE_ARGS} build create-docker-entrypoint && \
|
||||
make ${MAKE_ARGS} build link-binary && \
|
||||
mv bin /app/ && \
|
||||
mkdir -p /app/error_pages /app/certs
|
||||
|
||||
|
@ -57,4 +57,4 @@ ENV DOCKER_HOST=unix:///var/run/docker.sock
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["/app/entrypoint.sh"]
|
||||
CMD ["/app/run"]
|
5
Makefile
5
Makefile
|
@ -103,9 +103,8 @@ build-docker:
|
|||
--build-arg MAKE_ARGS="agent=${agent}" \
|
||||
.
|
||||
|
||||
create-docker-entrypoint:
|
||||
printf '#!/bin/sh\n/app/${NAME}\n' > bin/entrypoint.sh
|
||||
chmod +x bin/entrypoint.sh
|
||||
link-binary:
|
||||
ln -s /app/${NAME} bin/run
|
||||
|
||||
|
||||
# To generate schema
|
||||
|
|
Loading…
Add table
Reference in a new issue