I have a Skaffold file like this:
apiVersion: skaffold/v4beta1
kind: Config
build:
artifacts:
- image: app/auth
context: auth
sync:
manual:
- src: src/**/*.ts
dest: .
docker:
dockerfile: Dockerfile
And deploymant
files like following:
apiVersion: apps/v1
kind: Deployment
metadata:
name: auth-depl
spec:
replicas: 1
selector:
matchLabels:
app: auth
template:
metadata:
labels:
app: auth
spec:
containers:
- name: auth
image: app/auth
env:
- name: MONGO_URI
value: 'mongodb://auth-mongo-srv:27017/auth'
- name: JWT_KEY
valueFrom:
secretKeyRef:
name: jwt-secret
key: JWT_KEY
---
apiVersion: v1
kind: Service
metadata:
name: auth-srv
spec:
selector:
app: auth
ports:
- name: auth
protocol: TCP
port: 3000
targetPort: 3000
With a Dockerfile
like below:
FROM node:alpine
WORKDIR /app
COPY package.json .
RUN npm install --only=prod
COPY . .
CMD ["npm", "start"]
But after running skaffold dev
I see a list of docker images like this:
REPOSITORY TAG IMAGE ID CREATED SIZE
app/auth 429eadf4af2ad66af9f364eb3cfe8926e05276c4f579fe39c5112e3201b1e4ac 429eadf4af2a 15 minutes ago 345MB
app/auth latest 429eadf4af2a 15 minutes ago 345MB
Is it normal to have 2 different images for each container?