build: match dockerfile code for amd64 and arm64

This commit is contained in:
2025-02-23 04:33:03 -07:00
parent 84524ebf53
commit 9b9d5be591
2 changed files with 14 additions and 36 deletions

View File

@@ -47,11 +47,6 @@ LABEL org.opencontainers.image.url="https://github.com/TheBinaryNinja/tvapp2/pkg
LABEL org.opencontainers.image.licenses="MIT" LABEL org.opencontainers.image.licenses="MIT"
LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}" LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}"
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
# @repo.3 https://github.com/aetherinox/docker-base-alpine
# # # #
# Set Env Var # Set Env Var
# # # #
@@ -116,6 +111,4 @@ EXPOSE ${WEB_PORT}/tcp
# and then keep the container running. Hacky, but whatever. # and then keep the container running. Hacky, but whatever.
# # # #
#CMD ["npm start"]
ENTRYPOINT ["/init"] ENTRYPOINT ["/init"]

View File

@@ -51,10 +51,9 @@ LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}"
# # # #
ENV TZ="Etc/UTC" ENV TZ="Etc/UTC"
ENV URL_REPO_BASE="https://github.com/aetherinox/alpine-base/pkgs/container/alpine-base" ENV URL_REPO="https://git.binaryninja.net/BinaryNinja/"
ENV URL_REPO_APP="https://git.binaryninja.net/BinaryNinja/tvapp2" ENV WEB_IP="0.0.0.0"
ENV FILE_NAME="index.html" ENV WEB_PORT=4124
ENV PORT_HTTP=4124
ENV NODE_VERSION=18.20.5 ENV NODE_VERSION=18.20.5
ENV YARN_VERSION=1.22.22 ENV YARN_VERSION=1.22.22
@@ -77,16 +76,22 @@ RUN \
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/
# # # #
# Set work directory # copy s6-overlays root to image root
# #
COPY root/ /
# #
# set work directory
# # # #
WORKDIR /usr/src/app WORKDIR /usr/src/app
# # # #
# copy node package.json to workdir # copy tvapp2 project to workdir
# # # #
COPY package*.json ./ COPY tvapp2/ ./
# # # #
# install node (production) # install node (production)
@@ -94,35 +99,15 @@ COPY package*.json ./
RUN npm install --only=production RUN npm install --only=production
# #
# Add local files
# #
COPY . .
# COPY node_modules/ package.json package-lock.json formatted.dat index.js ./
# #
# when copying with the command above, all files in root folder will be copied.
# #
RUN rm -rf ./root
RUN rm ./Dockerfile ./Dockerfile.aarch64 docker-entrypoint.sh
# #
# copy s6-overlays root to image root
# #
COPY root/ /
# # # #
# Ports and volumes # Ports and volumes
# # # #
EXPOSE ${PORT_HTTP}/tcp EXPOSE ${WEB_PORT}/tcp
# # # #
# In case user sets up the cron for a longer duration, do a first run # In case user sets up the cron for a longer duration, do a first run
# and then keep the container running. Hacky, but whatever. # and then keep the container running. Hacky, but whatever.
# # # #
CMD ["sh", "-c", "npm start"] ENTRYPOINT ["/init"]