beijaflor-io / haskell-language-dockerfile Goto Github PK
View Code? Open in Web Editor NEWHaskell Dockerfile linter, parser, pretty-printer and EDSL, forked from https://github.com/lukasmartinelli/hadolint.
License: Other
Haskell Dockerfile linter, parser, pretty-printer and EDSL, forked from https://github.com/lukasmartinelli/hadolint.
License: Other
from ubuntu
should be equivalent to FROM ubuntu
Failures:
test/Language/Dockerfile/EDSLSpec.hs:58:
1) Language.Dockerfile.EDSL.toDockerfileStrIO let's us run in the IO monad
expected: "FROM ubuntu\nADD ./test/SanitySpec.hs /app/SanitySpec.hs\nADD ./test/Spec.hs /app/Spec.hs\nADD ./test/Test.hs /app/Test.hs\n"
but got: "FROM ubuntu\nADD ./test/Spec.hs /app/Spec.hs\nADD ./test/Test.hs /app/Test.hs\nADD ./test/SanitySpec.hs /app/SanitySpec.hs\n"
Randomized with seed 1989111289
ShellCheck
is pretty heavy-weight, I'd like to deprecate having it in this package.
Right now there is only supported
EXPOSE <port> [<port> ...]
where port
is integer, but in reference EXPOSE
is defined as
EXPOSE <port> [<port>/<protocol>...]
The
EXPOSE
instruction informs Docker that the container listens on the specified network ports at runtime. You can specify whether the port listens on TCP or UDP, and the default is TCP if the protocol is not specified.
I am very confused and hope that you can help me out understanding what the actual difference between language-docker and language-dockerfile is? The former project appears to be more actively maintained? Is there are reasoning I can follow to decide whether I want to base my own coding efforts on or the other version of this library?
Building test suite 'hadolint-unit-tests' for language-dockerfile-0.3.6.0..
test/Spec.hs:2:8: error:
File name does not match module name:
Saw: ‘Main’
Expected: ‘Spec’
Build failure as seen on the stackage build server:
Building library for language-dockerfile-0.3.6.0..
[ 1 of 16] Compiling Language.Dockerfile.Bash ( src/Language/Dockerfile/Bash.hs,
dist/build/Language/Dockerfile/Bash.o )
src/Language/Dockerfile/Bash.hs:9:81: error:
• Couldn't match expected type ‘CheckSpec’
with actual type ‘Maybe Shell -> CheckSpec’
• Probable cause: ‘spec’ is applied to too few arguments
In the second argument of ‘checkScript’, namely ‘spec’
In the second argument of ‘($)’, namely ‘checkScript si spec’
In the second argument of ‘($)’, namely
‘runIdentity $ checkScript si spec’
|
9 | shellcheck bashScript = map comment $ crComments $ runIdentity $ checkScript si spec
| ^^^^
src/Language/Dockerfile/Bash.hs:12:38: error:
• Couldn't match expected type ‘Bool’ with actual type ‘[a0]’
• In the third argument of ‘CheckSpec’, namely ‘exclusions’
In the expression: CheckSpec filename script exclusions (Just Bash)
In an equation for ‘spec’:
spec = CheckSpec filename script exclusions (Just Bash)
|
12 | spec = CheckSpec filename script exclusions (Just Bash)
| ^^^^^^^^^^
src/Language/Dockerfile/Bash.hs:12:50: error:
• Couldn't match expected type ‘[Integer]’
with actual type ‘Maybe Shell’
• In the fourth argument of ‘CheckSpec’, namely ‘(Just Bash)’
In the expression: CheckSpec filename script exclusions (Just Bash)
In an equation for ‘spec’:
spec = CheckSpec filename script exclusions (Just Bash)
|
12 | spec = CheckSpec filename script exclusions (Just Bash)
| ^^^^^^^^^
I'll try to see if I can reproduce it locally with the next stackage nightly snapshot.
src/Language/Dockerfile/Bash.hs:18:14: error:
Not in scope: data constructor ‘PositionedComment’
Perhaps you meant variable ‘newPositionedComment’ (imported from ShellCheck.Interface)
|
18 | comment (PositionedComment _ _ c) = c
| ^^^^^^^^^^^^^^^^^
cabal: Failed to build language-dockerfile-0.3.6.0.
The exact semantics need to be thought of.
My idea is to add a directive:
cache <fp> [host-fp]
It'll just keep track of the path on existing builds and mount it as a volume on subsequent builds. We can also offer to have the path mounted on the host from the start, and use that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.