mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-11 02:53:30 +00:00
Compare commits
3 Commits
c97ef43629
...
10ffb41353
Author | SHA1 | Date | |
---|---|---|---|
10ffb41353 | |||
5810781fd4 | |||
303d218570 |
18
shields/Dockerfile
Normal file
18
shields/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM node:12-alpine
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/app/private
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY . /usr/src/app
|
||||||
|
# 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 && \
|
||||||
|
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
|
@ -13,7 +13,8 @@ decompress:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
docker buildx build --platform linux/amd64,linux/arm64 --push \
|
docker buildx build --platform linux/amd64,linux/arm64 --push \
|
||||||
--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