Comments (2)
You are right, parser writes bytes into fp opened in textual mode, waht causes errors in py3. You may need to use BytesIO instead.
But I'm not sure if requiring bytes mode instead of textual mode is good and probably parser should be updated.
from dockerfile-parse.
Oh yes, it works with ByteIO. Thanks for the quick response!
Well, I'd be fine with it if this case would be documented or there would be an example on how to use the fileobj
parameter in the README.md :)
from dockerfile-parse.
Related Issues (20)
- [packit] Propose update failed for release 0.0.17
- Proposal - add more complex FROM clause parsing HOT 4
- Parser ignores RUN statements if comments are in them HOT 2
- Handle escape directive for Dockerfiles HOT 2
- dockerfile-parse creates a Dockerfile file HOT 3
- ARG's are not inherited from a parent stage - only the last stage is considered HOT 7
- Add support for dockerfile stages HOT 2
- Add support for updating global ARGs
- make dockerfile-parse an RPM available on src.fedoraproject.org/projects/rpms/ HOT 4
- Interpret shell substitution for build arguments HOT 1
- Option to only write data back to disk when explicitly requested HOT 3
- Base image is incorrect when FROM statement has --platform HOT 3
- Dockerfiles with different file names are not supported HOT 5
- Incompatibility with pytest 7.2.0 HOT 1
- Support heredocs
- Support parsing individual commands? HOT 1
- ARGs are not handled in FROM instruction HOT 6
- Keeping comments in the parsed result HOT 3
- What if "apt-get" becomes an instruction? HOT 6
- Incorrectly appending 'Dockerfile' to path HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfile-parse.