[go: up one dir, main page]

Skip to content

add podman guide for developer

Hi,

as I run with Podman instead of Docker, I wrote instructions for others to run also under podman. Hopefully this saves a bit time from someone in similar situation.

BTW, here's the output of kubernetes yaml generated by podman, in case someone is heading towards running this on kube.

# Generation of Kubernetes YAML is still under development!
#
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-1.8.2
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2020-03-22T16:08:06Z"
  labels:
    app: fevermap
  name: fevermap
spec:
  containers:
  - command:
    - mysqld
    env:
    - name: PATH
      value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - name: TERM
      value: xterm
    - name: MYSQL_DATABASE
      value: fevermap
    - name: MYSQL_USER
      value: fevermap
    - name: MYSQL_PASSWORD
      value: feverpass
    - name: LC_ALL
      value: C.UTF-8
    - name: LC_LANG
      value: C.UTF-8
    - name: MYSQL_ROOT_PASSWORD
      value: rootpass
    - name: container
      value: podman
    - name: HOSTNAME
      value: fevermap
    image: docker.io/ypcs/mariadb:latest
    name: database
    ports:
    - containerPort: 9000
      hostPort: 9000
      protocol: TCP
    resources: {}
    securityContext:
      allowPrivilegeEscalation: true
      capabilities: {}
      privileged: false
      readOnlyRootFilesystem: false
      seLinuxOptions: {}
    workingDir: /
  - env:
    - name: PATH
      value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - name: TERM
      value: xterm
    - name: container
      value: podman
    - name: USER
      value: fevermap
    - name: APPDIR
      value: /app
    - name: FEVERMAP_API_DATABASE_URI
      value: mysql://fevermap:feverpass@127.0.0.1/fevermap?charset=utf8mb4
    - name: HOSTNAME
      value: fevermap
    image: localhost/fevermap/api:latest
    name: api
    resources: {}
    securityContext:
      allowPrivilegeEscalation: true
      capabilities: {}
      privileged: false
      readOnlyRootFilesystem: false
      runAsGroup: 101
      runAsUser: 101
      seLinuxOptions: {}
    volumeMounts:
    - mountPath: /app
      name: home-cloud-user-src-fevermap-api
    workingDir: /app
  volumes:
  - hostPath:
      path: /home/cloud-user/src/fevermap/api
      type: Directory
    name: home-cloud-user-src-fevermap-api

I just drop it here as template, it would of course need to be further modified. But it's something to start with!

Merge request reports

Loading