Last active
December 4, 2024 16:00
-
-
Save dennyjohnk/54fdbc1ecedcd39ddc9f1b40a2b1ea60 to your computer and use it in GitHub Desktop.
Docker File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mk-docker.jfrog.io/gold-images/nodejs:18 | |
ARG NPM_TOKEN | |
ARG ARTIFACTORY_USER | |
ARG ARTIFACTORY_PASS | |
ARG FE_ID | |
RUN apt-get install -y curl | |
RUN apt-get install -y unzip | |
#Install OS dependencies | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package*.json /usr/src/app/ | |
# Install app dependenciescd based on package-lock | |
# --virtual: bundle packages, remove whole bundle at once, when done | |
RUN echo "registry=https://mk-docker.jfrog.io/artifactory/api/npm/npm/\n//mk-docker.jfrog.io/artifactory/api/npm/npm/:_authToken=$NPM_TOKEN" > .npmrc | |
RUN npm ci --production | |
RUN rm -f .npmrc | |
COPY . /usr/src/app | |
RUN curl -L -sSf -u $ARTIFACTORY_USER:$ARTIFACTORY_PASS "https://mk-docker.jfrog.io/artifactory/dss-docker-k8s/dss-addin/build_$FE_ID.zip" -o "build.zip" | |
RUN unzip -o build.zip -d ./assets | |
RUN chown -R docker:docker . | |
USER docker | |
CMD ["sh","entrypoint.sh"] | |
EXPOSE 1337 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment