Run docker container with a different command in Kubernetes

Run docker container with a different command in Kubernetes

Content Index :

Run docker container with a different command in Kubernetes
Tag : docker , By : baylisscg
Date : January 12 2021, 08:33 AM

may help you . I think this might just be a mixup of the Pod spec. In Kubernetes, the command is the equivalent of the Docker ENTRYPOINT and the args are the equivalent of CMD. In your case, I think you want:
        name: gitlab
        image: docker.artifactory.abc.net/sameersbn/gitlab:9.3.9
        - "/sbin/entrypoint.sh"
        - "app:rake"
        - "db:setup"
        - name: gfs-vol-gitlab
          mountPath: /home/git/data
        - containerPort: 443
        resources: {}

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Difference between Docker ENTRYPOINT and Kubernetes container spec COMMAND?

Tag : docker , By : Steven Weber
Date : March 29 2020, 07:55 AM
hope this fix your issue Kubernetes provides us with multiple options on how to use these commands:
When you override the default Entrypoint and Cmd in Kubernetes .yaml file, these rules apply:
FROM alpine:latest
COPY "executable_file" /
ENTRYPOINT [ "./executable_file" ]
      - name: container_name
        image: image_name
        args: ["arg1", "arg2", "arg3"]

How to get container's disk usage in Kubernetes (without docker command)?

Tag : kubernetes , By : Ben Kohn
Date : March 29 2020, 07:55 AM
should help you out Yes, but currently not with kubectl, you can get metrics from the kubelet, either through the kube-apiserver (proxied) or directly calling the kubelet HTTP(s) server endpoint (default port 10250). Disk metrics are generally available on the /stats/summary endpoint and you can also find some cAdvisor metrics on the /metrics/cavisor endpoint.
For example, to get the 'usedBytes' for the first container in the first pod returned through the kube-apiserver:
$ curl -k -s -H 'Authorization: Bearer <REDACTED>' \
  https://kube-apiserver:6443/api/v1/nodes/<node-name>/proxy/stats/summary \
  | jq '.pods[0].containers[0].rootfs.usedBytes'
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
  name: myrole
- apiGroups:
  - ""
  - nodes
  - nodes/proxy
  - get
  - list
  - watch
- nonResourceURLs:
  - /metrics
  - /api/*
  - get

How to pull docker images hosted on Google Container Registry via Kubernetes (kubernetes included on docker for desktop)

Tag : docker , By : Sinisa Ruzin
Date : March 29 2020, 07:55 AM
wish help you to fix your issue OK found the culprit, it has something to do with Powershell and Command Prompt.
I switched to using Git Bash and followed the same instructions in this tutorial

How to pass arguments to Docker container in Kubernetes or OpenShift through command line?

Tag : docker , By : THD
Date : March 29 2020, 07:55 AM
like below fixes the issue I have a bash script in a Docker image to which I can pass a command line argument through docker run (having specified the bash script in ENTRYPOINT and a default parameter in CMD like in this answer). So I would run something like , The following command should do it:
kubectl run my-app --image=my_docker_test -- argument_1

How do I run a container from the command line in Kubernetes (like docker run)?

Tag : kubernetes , By : Eugenio
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Kubernetes equivalent of 'docker run -it'
  • Can we spawn more containers from existing one in a pod?
  • How To Mount Directory Of Conainter Into Another After containers are run?
  • I can't run Docker ToolBox on Windows 7
  • How to roll back a deployment to a previous revision automatically when deployment has crossed 'progressDeadlineSeconds'
  • Persist ENV vars across multi-stage Docker builds
  • Copy text file from docker container to host
  • /bin/sh: 1: sudo: not found when running dockerfile
  • Websphere Liberty running on Docker with Open JDK 11
  • Setting up Traefik with Cloudflare
  • Cassandra/Scylla on docker without internet in linux server
  • How to diagnose ECS Fargate task failing to start?
  • The Compose file './docker-compose.yml' is invalid because: Unsupported config option
  • Configure docker run to use ssl / https / tls
  • Traefik middle-wares are not working with docker compose
  • How to write commands with multiple lines in Dockerfile
  • How to start the stopped ubuntu container in docker? (ran without options (-i - t) )
  • Kubernetes resource request/limit values
  • Does Docker swarm ignore VOLUME commands from Dockerfiles?
  • Access a Caddy server by IP
  • How to Configure Kubeconfig based login in Kubernetes Dashboard
  • Changing Redis port in Docker Compose not working
  • Kubernetes - Private Repository deployment issue
  • How do I configure my docker container to run in the browser?
  • Starting docker container results in docker-credential-secretservice: The connection is closed
  • Default IP of AWS Codebuild
  • ForwardAuth Middleware is not working in Traefik as API Gateway
  • Unable to get my Docker image's base image
  • Why is my Kubernetes deployment registering as unavailable even though it runs in Docker?
  • Docker volume backup error: Tar: MYCONTAINER_VOLUME: Cannot stat: No such file or directory
  • Translate docker run into subcomponents
  • Error running docker build for arm32v7 container on amd64 linux machine: standard_init_linux.go:207
  • How run jboss-cli on start docker container with Dockerfile
  • How to restrict that a docker container only listens connection from localhost?
  • Will changing the Linux hostname of a Docker Swarm manager cause it to lose its Swarm Manager status?
  • Why I cannot deploy my app to docker successfully
  • .net core console application using TopShelf
  • how to run docker-compose.yaml on kubernetes?
  • Docker container networking - Kafka Producer
  • What is the different of . and ./ in RUN
  • Running Elasticsearch with Docker
  • Cannot run a Groovy sh command in Jenkins
  • Why there is no logon happens when attach to docker busybox image?
  • Access to container created by docker-compose in same network
  • My docker swarm creates a <none> images on which is keeps running when trying to update
  • Docker build with latest apt package is general?
  • docker-compose is starting containers after host reboot. Which ones?
  • docker-compose on Windows 10: cannot find image?
  • How can I update HTTP_HOST in Apache for Mautic Docker
  • Docker, MySQL - Error 1045, Access denied for use root
  • Customize Hasura Docker Image
  • What is exec in Dockerfile ENTRYPOINT and why is a process started twice without it?
  • Docker doesn't work when using getsentry/sentry-cli
  • Ansible AWX docker container infinite restart
  • How to use docker-compose to build an application on a CI?
  • Error (failed_to_start_child) when running ecto in ejabberd production mode inside docker
  • Use environment files outside the directory to provide parameter during build time with docker-compose
  • Heroku Docker Deploy build args
  • Docker Build Kitura Sqift Container - Shim.h mysql.h file not found
  • Docker Can't Find = in "ENV" Must be of the form: name=value
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com