Comments (12)
It can be overwritten by the user.
from deno_docker.
@bartlomieju what do you think about this: https://github.com/hayd/deno_docker/blob/master/example/Dockerfile
Do you think that DENO_DIR should be set in the parent(s)?
I use different layers, and cache that way. Is there some other way/something else which I am missing?
from deno_docker.
This could also be added:
RUN addgroup -g 1000 -S deno && \
adduser -u 1000 -S deno -G deno && \
mkdir /cache/ && \
chown deno:deno /cache/
USER deno
ENV DENO_DIR /cache/
WORKDIR /app
from deno_docker.
I believe that DENO_DIR
should be controlled by the user, so it should be defined as late as possible. CC @zekth who has more experience with Docker
from deno_docker.
I believe that DENO_DIR should be controlled by the user,
I don't agree with this, we want to make sure the inner structure is owned by the dockerfile and could not be manipulated with the user. If the user wants to manipulate it i'd suggest to map it on the host or on a volume like:
docker run -v /MyLocalPathForCache/:/cache/ mydenocontainer
from deno_docker.
Should we use /deno-dir/ over /cache/ ?
from deno_docker.
Should we use /deno-dir/ over /cache/ ?
I think it's better to use the same naming yes.
from deno_docker.
I also create a deno
USER, this could either be the default (it is now 😬 ) or have users set USER prior to deno execution (fetch/run).
from deno_docker.
I think this is sufficient now? @bartlomieju
Would probably be good to add an example of a multi container / shared volume ? I haven't done this myself / used multi container.
On re-reading is it you're saying it should be a directory shared with the host? Because I strongly disagree. I think the deps.ts is a good solution to minimize fetch/compile time... Sharing volumes with the host seems like an anti-pattern...?
from deno_docker.
@hayd depends. But the volume has to be documented, then if needed the user can share the host. For example it's fairly known to use this pattern with database containers.
from deno_docker.
Sharing with the host seems like a bad idea from a devops/production point of view 🤔, being self-contained as a container seems like a huge win! (see example)
I see why you may want to in a db container... though I'm in favor of stateless web applications and db as distinct server (and port map/forward to that).
Volumes are interesting: https://docs.docker.com/storage/volumes/
I think we can get away with just linking to them/suggesting they can be used?
from deno_docker.
Volumes are usable also in this case and can tackle the issue with sharing the volume i agree. But people tend to like mapping directly directories even if it's anti pattern. 🤷♂️
from deno_docker.
Related Issues (20)
- Release improvements
- Create Alpine/APK package for Deno HOT 9
- Tini warning when building 1.28.1 image HOT 3
- Containers for 1.30.0 have Deno CLI version 1.29.4 HOT 2
- Add release workflow HOT 1
- Cache not caching all deps? HOT 10
- Become a docker verified publisher
- Use Docker official actions
- Document tini HOT 3
- Bash function not working as intended from the documentation
- No tag for 1.36.2 HOT 1
- Permission denied (os error 13) when writing to file from Dockerfile
- Simple express app segfaults in alpine Docker image HOT 2
- Docker sponsorship and/or alternate container registry options HOT 1
- Proposal: Distroless and Alpine image improvements. HOT 3
- Add ARM64 platform to docker images HOT 1
- Alpine ARM64 docker container broken HOT 1
- Latest image (1.40.5) missing unzip HOT 2
- Unable to pull v1.40.5 HOT 2
- Latest image broke nodejs / npm usage (maybe related to libgcc) HOT 5
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 deno_docker.