Skip to content

Instantly share code, notes, and snippets.

@kfrz
Created February 10, 2022 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfrz/206e819163a23ad7b202f9ffb7aeb39d to your computer and use it in GitHub Desktop.
Save kfrz/206e819163a23ad7b202f9ffb7aeb39d to your computer and use it in GitHub Desktop.
# Consider the following dockerfile
FROM python:3
RUN mkdir /app
COPY . /app
RUN pip install flask
EXPOSE 3000
CMD [ "python", "./yourscript.py" ]
# How many layers does this docker image have?
# If a change is made to yourscript.py which layers get invalidated?
# How can you optimize this docker file for development? Assume the scripts in the current directory change often
@kfrz
Copy link
Author

kfrz commented Feb 10, 2022

# Consider the following kubernetes manifest
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgresql-db
  labels:
    app: postgresql-database
spec:
  replicas: 3
  selector:
    matchLabels:
      app: postgresql
  template:
    metadata:
      labels:
        app: postgresql
    spec:
      containers:
        - name: postgresql
          image: postgresql:latest
          env:
            - name: POSTGRES_PASSWORD
              value: testpassword
            - name: PGDATA
              value: /data/pgdata

# What is this manifest attempting to do?
# Identify all bad practices in the manifest?
# Is anything missing that you think would be relevant?
# How would you improve the manifest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment