mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 18:43:29 +00:00
Update shields/Makefile, shields/Dockerfile files
This commit is contained in:
parent
c97ef43629
commit
303d218570
23
shields/Dockerfile
Normal file
23
shields/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM node:14.16.0-alpine3.13
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/app/private
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json /usr/src/app/
|
||||||
|
# Without the badge-maker package.json and CLI script in place, `npm ci` will fail.
|
||||||
|
COPY badge-maker /usr/src/app/badge-maker/
|
||||||
|
|
||||||
|
# We need dev deps to build the front end. We don't need Cypress, though.
|
||||||
|
RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci
|
||||||
|
|
||||||
|
COPY . /usr/src/app
|
||||||
|
RUN npm run build && \
|
||||||
|
npm prune --production && \
|
||||||
|
npm cache clean --force
|
||||||
|
|
||||||
|
# Run the server using production configs.
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
CMD node server
|
||||||
|
|
||||||
|
EXPOSE 80
|
@ -16,4 +16,5 @@ build:
|
|||||||
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
||||||
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
||||||
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
||||||
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) shields-$(VERSION)
|
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) \
|
||||||
|
--file Dockerfile shields-$(VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user