Fix dockerfile and makefile

This commit is contained in:
yusing 2025-02-10 10:05:31 +08:00
parent 0a7b28caf5
commit a59ad97e5e
2 changed files with 4 additions and 5 deletions

View file

@ -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"]

View file

@ -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