Code Monkey home page Code Monkey logo

Comments (5)

peti avatar peti commented on June 4, 2024 1

Curiously enough, hub.docker.io handles that file, too: https://hub.docker.com/r/psimons/opensuse-docker/builds/bcqiycksrui3xjdd7eh7jmd/. Apparently, the missing \ causes the next shell command to be interpreted as a separate RUN statement. I have never noticed that; I omitted the \ by accident.

Anyhow, I agree that this behavior is unreliable at best and that it's probably a feature rather than a bug that the parser doesn't accept this code. I committed peti/opensuse-docker@bb78399 to fix my file accordingly. Thank you very much for your help.

from language-docker.

zemanlx avatar zemanlx commented on June 4, 2024

What is your version of docker? I have just tried it on my one and it recognized as invalid Dockefile

$ wget https://raw.githubusercontent.com/peti/opensuse-docker/master/tw-haskell-dev/Dockerfile -q
$ docker --version
Docker version 18.05.0-ce, build f150324
$ docker build -t tw-haskell-dev .
Sending build context to Docker daemon   2.56kB
Error response from daemon: Dockerfile parse error line 18: unknown instruction: &&

from language-docker.

peti avatar peti commented on June 4, 2024

I have Docker version 18.03.1-ce, build 9ee9f402cd1eba817c5591a64f1d770c87c421a4.

from language-docker.

zemanlx avatar zemanlx commented on June 4, 2024

Hmm I have tried it on Ubuntu VM

# wget https://raw.githubusercontent.com/peti/opensuse-docker/master/tw-haskell-dev/Dockerfile -q

# docker --version
Docker version 18.03.1-ce, build 9ee9f40

# docker build -t tw-haskell-dev .
Sending build context to Docker daemon   2.56kB
Error response from daemon: Dockerfile parse error line 18: unknown instruction: &&

and it still does not work as I would expect. Looks like dark magic (something not in my knowledge) is happening in your environment.

Anyway oneline to multiline should be broken by using \ and if that is ignored it sounds like an issue with docker/moby or OS and will not work on most of installations.

Can you try it somewhere else? Are you able to reproduce this behaviour?

from language-docker.

lorenzo avatar lorenzo commented on June 4, 2024

well, I guess this was a win for the docker file linter!!

I'm closing as there is no action we need to take here.

from language-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.