mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +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" \
|
RUN --mount=type=cache,target="/go/pkg/mod" \
|
||||||
--mount=type=cache,target="/root/.cache/go-build" \
|
--mount=type=cache,target="/root/.cache/go-build" \
|
||||||
make ${MAKE_ARGS} build create-docker-entrypoint && \
|
make ${MAKE_ARGS} build link-binary && \
|
||||||
mv bin /app/ && \
|
mv bin /app/ && \
|
||||||
mkdir -p /app/error_pages /app/certs
|
mkdir -p /app/error_pages /app/certs
|
||||||
|
|
||||||
|
@ -57,4 +57,4 @@ ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||||
|
|
||||||
WORKDIR /app
|
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}" \
|
--build-arg MAKE_ARGS="agent=${agent}" \
|
||||||
.
|
.
|
||||||
|
|
||||||
create-docker-entrypoint:
|
link-binary:
|
||||||
printf '#!/bin/sh\n/app/${NAME}\n' > bin/entrypoint.sh
|
ln -s /app/${NAME} bin/run
|
||||||
chmod +x bin/entrypoint.sh
|
|
||||||
|
|
||||||
|
|
||||||
# To generate schema
|
# To generate schema
|
||||||
|
|
Loading…
Add table
Reference in a new issue