The docker image should get built
Dies with the error:
Error parsing reference: "node:alpine AS base" is not a valid repository/tag: invalid reference format
apiVersion: skaffold/v1alpha2
kind: Config
build:
tagPolicy:
envTemplate:
template: "{{.DOCKER_REGISTRY}}/heroic/destiny:{{.VERSION}}"
artifacts:
- imageName: destiny
workspace: .
docker: {}
local: {}
deploy:
kubectl:
manifests:
profiles:
- name: dev
build:
tagPolicy:
envTemplate:
template: "{{.DOCKER_REGISTRY}}/heroic/destiny:{{.DIGEST_HEX}}"
artifacts:
- docker: {}
local: {}
deploy:
helm:
releases:
- name: destiny
chartPath: charts/destiny
setValueTemplates:
image.repository: "{{.DOCKER_REGISTRY}}/heroic/destiny"
image.tag: "{{.TAG}}"
#
# ---- Base Node ----
FROM node:alpine as base
WORKDIR /usr/src/app
COPY ./package.json ./
COPY ./yarn.lock ./
ENV PORT 8080
EXPOSE 8080
#
# ---- Dependencies ----
FROM base AS dependencies
# install node packages
RUN apk add --no-cache postgresql-dev python g++ make \
&& yarn install --prod --silent \
&& cp -R node_modules prod_node_modules \
&& apk del python g++ make
#
# ---- Release ----
FROM base AS release
# copy production node_modules
CMD node ./index.js
COPY --from=dependencies /app/prod_node_modules ./node_modules
COPY . .
might be linked to #502
@heroic I can't reproduce your issue. Do you by chance have an open-source project to test? Or maybe you could come up with a simpler project that has the same issue.
@heroic also, could you provide the full output of the command?
@dgageot I figured this out. Turns out this wasn't a skaffold issue but GKE, which runs docker version 17.03 on the cluster. Docker 17.03 does not support multi stage builds
Most helpful comment
@dgageot I figured this out. Turns out this wasn't a skaffold issue but GKE, which runs docker version 17.03 on the cluster. Docker 17.03 does not support multi stage builds