<p>I found out how:</p>
<pre><code>minikube image save gcr.io/xx/yy /tmp/a.tar
</code></pre>
<p>then open that <code>/tmp/a.tar</code> using any decompressor and look for the <code>.json</code> file to know the entrypoint or cmd.</p>
<p>Not sure how to do this with real remote kubernetes though.</p>

CC BY-SA 4.0
2023-03-29T19:59:17.283Z
2023-03-29T20:38:16.123Z
2023-03-29T20:38:16.123Z
Kokizzu
<p>If you're running docker, pull the image and inspect it with:</p>
<pre class="lang-shell prettyprint-override"><code>docker pull gcr.io/xx/yy
docker image inspect gcr.io/xx/yy
</code></pre>
<p>Without docker, some registries allow you to explore the images. And there are online tools like <a href="https://explore.ggcr.dev" rel="nofollow noreferrer">https://explore.ggcr.dev</a> (drill down into the config digest).</p>
<p>There are also commands to interact with registries, including crane (from Google), skopeo (from Redhat), and regclient/regctl (from me). Here's the regctl example:</p>
<pre class="lang-shell prettyprint-override"><code>$ regctl image inspect ghcr.io/regclient/regsync:latest
{
  &quot;created&quot;: &quot;2023-02-26T02:37:17Z&quot;,
  &quot;architecture&quot;: &quot;amd64&quot;,
  &quot;os&quot;: &quot;linux&quot;,
  &quot;config&quot;: {
    &quot;User&quot;: &quot;appuser&quot;,
    &quot;Env&quot;: [
      &quot;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&quot;
    ],
    &quot;Entrypoint&quot;: [
      &quot;/regsync&quot;
    ],
    &quot;WorkingDir&quot;: &quot;/&quot;,
...
</code></pre>

CC BY-SA 4.0
2023-03-29T20:17:28.907Z
2023-03-29T20:17:28.907Z
BMitch
<p>So I have a deployment like this:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: yy
spec:
  containers:
    - name: yy
      image: gcr.io/xx/yy
  imagePullSecrets:
    - name: gcr-json-key
</code></pre>
<p>That <code>CrashLoopBackOff</code> on Minikube, I know the issue, that the <code>ENTRYPOINT</code> need to be overriden before use, how can I know what's the original <code>CMD</code>/<code>ENTRYPOINT</code> of that image?</p>

<docker><kubernetes><minikube>
How to get Dockerfile or last CMD/ENTRYPOINT of a kubernetes deployment image?
Kokizzu
# How to get Dockerfile or last CMD/ENTRYPOINT of a kubernetes deployment image?

(Asked by: username_0 on 2023-03-29)

So I have a deployment like this:
apiVersion: v1
kind: Pod
metadata:
  name: yy
spec:
  containers:
    - name: yy
      image: gcr.io/xx/yy
  imagePullSecrets:
    - name: gcr-json-key

That CrashLoopBackOff on Minikube, I know the issue, that the ENTRYPOINT need to be overriden before use, how can I know what's the original CMD/ENTRYPOINT of that image?

**Tags:** docker, kubernetes, minikube


---

## 2 answers

### Answer by username_1 on 2023-03-29. Score: 1 | Accepted answer

If you're running docker, pull the image and inspect it with:
docker pull gcr.io/xx/yy
docker image inspect gcr.io/xx/yy

Without docker, some registries allow you to explore the images. And there are online tools like https://explore.ggcr.dev (drill down into the config digest).
There are also commands to interact with registries, including crane (from Google), skopeo (from Redhat), and regclient/regctl (from me). Here's the regctl example:
$ regctl image inspect ghcr.io/regclient/regsync:latest
{
  "created": "2023-02-26T02:37:17Z",
  "architecture": "amd64",
  "os": "linux",
  "config": {
    "User": "appuser",
    "Env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ],
    "Entrypoint": [
      "/regsync"
    ],
    "WorkingDir": "/",
...


---

### Answer by username_0 on 2023-03-29. Score: 0

I found out how:
minikube image save gcr.io/xx/yy /tmp/a.tar

then open that /tmp/a.tar using any decompressor and look for the .json file to know the entrypoint or cmd.
Not sure how to do this with real remote kubernetes though.


---

