Skip to content

Commit

Permalink
🚧 progress: Attempt at debugging Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 2, 2024
1 parent 19015ae commit 84cafba
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,37 @@ RUN apt-get update && \
apt-get install -y curl python python3 make g++ bzip2 ca-certificates --no-install-recommends && \
rm -rf /var/lib/apt/lists/*

COPY ./types /home/app/src/types
COPY ./imports /home/app/src/imports
COPY ./server /home/app/src/server
COPY ./client /home/app/src/client
COPY ./.meteor /home/app/src/.meteor
COPY [ \
"./client", \
"./imports", \
"./server", \
"./types", \
"./.meteor", \
"./package.json", \
"./tsconfig.json", \
"./package-lock.json", \
"/home/app/" \
"/home/app/src/" \
]

RUN chown -R app:app /home/app/

USER app

RUN echo "export METEOR_LOCAL_RELEASE=$(sed -n 's/^METEOR@\([0-9][0-9]*.*\)$/\1/p' .meteor/release)" >> ./.env
RUN echo "export METEOR_LOCAL_RELEASE=$(sed -n 's/^METEOR@\([0-9][0-9]*.*\)$/\1/p' src/.meteor/release)" >> ./.env
RUN . ./.env; echo "export METEOR_EXECUTABLE_VERSION=${METEOR_LOCAL_RELEASE}" >> ./.env
RUN . ./.env; curl "https://install.meteor.com?release=${METEOR_EXECUTABLE_VERSION}" | sh

ARG PATH="/home/app/.meteor:${PATH}"
ENV PATH="/home/app/.meteor:${PATH}"

RUN echo "export NODE_VERSION=$(meteor node --version | tail -c +2)" >> ./.env
RUN echo "export NPM_VERSION=$(meteor npm --version)" >> ./.env

RUN find . -maxdepth 3

# RUN meteor npm clean-install

RUN meteor npm run build -- ./dist --directory --architecture os.linux.x86_64 --server-only
RUN cd src && \
meteor npm run build -- ../dist --directory --architecture os.linux.x86_64 --server-only

RUN cd dist/bundle/programs/server && \
meteor npm install
Expand All @@ -47,7 +50,7 @@ FROM $IMAGE_BASE

RUN useradd --create-home --shell /bin/bash --uid 1000 --user-group app

COPY --from=build src/dist/bundle /home/app/
COPY --from=build dist/bundle /home/app/

RUN chown -R app:app /home/app/

Expand All @@ -56,7 +59,7 @@ WORKDIR /home/app

ENV \
ARCH="linux-x64" \
NODE_INSTALL_PATH="/home/app/bin"
NODE_INSTALL_PATH="${HOME}/bin"

RUN mkdir -p "${NODE_INSTALL_PATH}" && \
rm -r "${NODE_INSTALL_PATH}"
Expand Down

0 comments on commit 84cafba

Please sign in to comment.