Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FROM attribute in the output Dockerfile is the image itself #155

Closed
sandal-maker opened this issue Oct 7, 2020 · 4 comments
Closed

FROM attribute in the output Dockerfile is the image itself #155

sandal-maker opened this issue Oct 7, 2020 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists help wanted Extra attention is needed

Comments

@sandal-maker
Copy link

Describe the bug
When used to get the Dockerfile for gitlab/gitlab-runner:latest, the FROM attribute in the output Dockerfile is gitlab/gitlab-runner:latest and not alpine:3.12.0 as it should be.

To Reproduce
Steps to reproduce the behavior run the following script:

docker pull quay.io/laniksj/dfimage
alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm quay.io/laniksj/dfimage"
dfimage gitlab/gitlab-runner:latest

Expected behavior
Expected to see the following:
FROM alpine:3.12.0

Actual behavior
This is the actual output.
Check the first line FROM attribute.

FROM gitlab/gitlab-runner:latest
ADD file:1b4ec50586b9f0621095f51ee6baecc00a7f6d95b4a04e3bedc5393b28bc8a54 in /
RUN /bin/sh -c set -xe 		\
    && echo '#!/bin/sh' > /usr/sbin/policy-rc.d 	\
    && echo 'exit 101' >> /usr/sbin/policy-rc.d 	\
    && chmod +x /usr/sbin/policy-rc.d 		\
    && dpkg-divert --local --rename --add /sbin/initctl 	\
    && cp -a /usr/sbin/policy-rc.d /sbin/initctl 	\
    && sed -i 's/^exit.*/exit 0/' /sbin/initctl 		\
    && echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup 		\
    && echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean 	\
    && echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean 	\
    && echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean 		\
    && echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages 		\
    && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes 		\
    && echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests
RUN /bin/sh -c [ -z "$(apt-get indextargets)" ]
RUN /bin/sh -c mkdir -p /run/systemd \
    && echo 'docker' > /run/systemd/container
CMD ["/bin/bash"]
RUN ARG TARGETPLATFORM
RUN ENV DEBIAN_FRONTEND=noninteractive
RUN RUN |1 TARGETPLATFORM=linux/amd64 /bin/sh -c apt-get update -y \
    &&     apt-get install -y --no-install-recommends         apt-transport-https         ca-certificates         curl         git         wget         tzdata         openssh-client     \
    && rm -rf /var/lib/apt/lists/* # buildkit
RUN ARG DOCKER_MACHINE_VERSION
RUN ARG DUMB_INIT_VERSION
RUN ARG GIT_LFS_VERSION
RUN COPY gitlab-runner_*.deb checksums-* install-deps install-gitlab-runner /tmp/ # buildkit
RUN RUN |4 TARGETPLATFORM=linux/amd64 DOCKER_MACHINE_VERSION=0.16.2 DUMB_INIT_VERSION=1.2.2 GIT_LFS_VERSION=2.11.0 /bin/sh -c /tmp/install-deps "${TARGETPLATFORM}" "${DOCKER_MACHINE_VERSION}" "${DUMB_INIT_VERSION}" "${GIT_LFS_VERSION}" # buildkit
RUN COPY entrypoint / # buildkit
RUN RUN |4 TARGETPLATFORM=linux/amd64 DOCKER_MACHINE_VERSION=0.16.2 DUMB_INIT_VERSION=1.2.2 GIT_LFS_VERSION=2.11.0 /bin/sh -c chmod +x /entrypoint # buildkit
RUN STOPSIGNAL SIGQUIT
RUN VOLUME [/etc/gitlab-runner /home/gitlab-runner]
RUN ENTRYPOINT ["/usr/bin/dumb-init" "/entrypoint"]
RUN CMD ["run" "--user=gitlab-runner" "--working-directory=/home/gitlab-runner"]
  • OS: macos
  • Docker Version: 19.03.13
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Oct 7, 2020
@LanikSJ
Copy link
Owner

LanikSJ commented Oct 7, 2020

Looks like Docker changed how they read the layers. I'll have to look into it and see if I can figure out what they've changed.

@stale
Copy link

stale bot commented Dec 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 12, 2020
@stale stale bot closed this as completed Dec 25, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2021
@LanikSJ LanikSJ removed the wontfix This will not be worked on label Jan 19, 2022
@LanikSJ LanikSJ reopened this May 16, 2024
@LanikSJ LanikSJ added duplicate This issue or pull request already exists help wanted Extra attention is needed labels May 16, 2024
@LanikSJ
Copy link
Owner

LanikSJ commented May 16, 2024

Closing this in favor of #251

@LanikSJ LanikSJ closed this as completed May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working duplicate This issue or pull request already exists help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants