Skip to content

Commit c4d96e8

Browse files
committed
feat(docker): separate installation & working directories
1 parent 916f3fe commit c4d96e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ COPY --link . .
1515

1616
FROM node:18-alpine AS runner
1717
RUN apk --no-cache add curl \
18-
&& adduser --disabled-password --home /home/container container
18+
&& adduser --disabled-password --home /home/container container \
19+
&& mkdir /app
1920
USER container
2021
ENV USER=container \
2122
HOME=/home/container \
2223
NODE_ENV=production \
2324
HTTP_HOST=0.0.0.0 \
2425
HTTP_PORT=80
2526
WORKDIR /home/container
26-
COPY --from=builder --chown=container:container /build ./
27+
COPY --from=builder --chown=container:container /build /app
2728
EXPOSE ${HTTP_PORT}/tcp
28-
ENTRYPOINT [ "/home/container/scripts/start.sh" ]
29+
ENTRYPOINT [ "/app/scripts/start.sh" ]
2930
HEALTHCHECK --interval=15s --timeout=5s --start-period=60s \
3031
CMD curl -f http://localhost:${HTTP_PORT}/status || exit 1
3132
LABEL org.opencontainers.image.source=https://github.com/discord-tickets/bot \

0 commit comments

Comments
 (0)