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

Empty Continuation Line in Dockerfile #8166

Open
sirajrauff opened this issue Apr 12, 2021 · 1 comment
Open

Empty Continuation Line in Dockerfile #8166

sirajrauff opened this issue Apr 12, 2021 · 1 comment

Comments

@sirajrauff
Copy link
Contributor

sirajrauff commented Apr 12, 2021

Warning thrown in hab pkg export container:

$ sudo hab pkg export container sirajrauff/sample-node-app
» Building a container image with: sirajrauff/sample-node-app
Ω Creating build root in /tmp/.tmplBNSju
Ω Creating root filesystem
Ω Creating artifact cache symlink
Ω Creating key cache symlink
» Installing core/hab
[..]
☒ Deleting artifact key symlink
☒ Deleting artifact cache symlink
Ω Creating user 'hab' in /etc/passwd
Ω Creating group 'hab' in /etc/group
Ω Creating entrypoint script
Ω Creating image Dockerfile
Ω Creating image
Sending build context to Docker daemon  485.1MB
[WARNING]: Empty continuation line found in:
    RUN     find /hab -type d -exec chmod g=u {} \; &&     mkdir /root && chmod 750 root &&     mkdir /tmp && chmod 1777 /tmp &&     mkdir -p /var/tmp && chmod 1777 /var/tmp &&     mkdir -p /.hab/cache/keys && chmod -R 770 /.hab
[WARNING]: Empty continuation lines will become errors in a future release

Managed to pull the Dockerfile:

FROM scratch
ENV PATH /bin
ADD rootfs/hab /hab

# Contains all our busybox userspace links, hab binary link, and any user
# package binary links
#
# TODO: The creation of this directory and the links therein could be
# executed directly in this Dockerfile, in a series of commands
# executed at the beginning of the following RUN directive. This could
# simplify Rust code, as well as save an additional layer.
COPY rootfs/bin /bin

RUN \
    # Remember, in order to be able to run a Supervisor as non-root,
    # we must at least have write access to the /hab directory. If you
    # further wish to run an *updating* Supervisor (or one that
    # updates its services), you will (generically) require write
    # access to everything under `/hab/pkgs` as well.
    #
    # (One final note: we run this `find` command *after* we set up /bin
    # to avoid having to call our busybox binary directly.)
    find /hab -type d -exec chmod g=u {} \; && \
    # Create the minimum amount of directories for things to work.
    #
    # /tmp is particularly required for the Supervisor / Launcher
    # communication pipe.
    mkdir /root && chmod 750 root && \
    mkdir /tmp && chmod 1777 /tmp && \
    mkdir -p /var/tmp && chmod 1777 /var/tmp && \

    # This is currently needed in order for non-root containers to
    # function... this ends up being their home directory, and we
    # expect to find key cache directory there right now.
    mkdir -p /.hab/cache/keys && chmod -R 770 /.hab

# Ensure our custom /etc content (notably `passwd` and `group` files,
# but also our linked cacerts in /etc/ssl) are present.
#
# TODO: The creation of everything in this directory could potentially
# be taken entirely out of Rust and implemented here in the Dockerfile.
COPY rootfs/etc /etc
COPY rootfs/init.sh /init.sh

EXPOSE 9631 
RUN HAB_FEAT_OFFLINE_INSTALL=ON \
        HAB_LICENSE=accept-no-persist \
    /hab/pkgs/core/hab/1.6.288/20210402191717/bin/hab pkg install sirajrauff/sample-node-app/0.1.0/20210412160756
ENTRYPOINT ["/init.sh"]
CMD ["run", "sirajrauff/sample-node-app"]

I imagine this warning/future error is concerning the RUN \ line? or the line break after the mkdir -p /var/tmp?

Aha! Link: https://chef.aha.io/features/APPDL-18

@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants