通过MacOS加载图像的Docker运行网站,而不是在服务器上运行
在MacOS上开发时,我通过Docker运行了一个网站,默认情况下设置了使用案例不敏感的文件系统。
当我运行网站时,我正在通过Docker在本地没有任何问题的图像。当我部署时,它不起作用。经检查,我发现图像为this_is_my_image.jpg
,但我请求this_is_my_image.jpg
。
我的[不正确]假设是,使用Docker我将获得Linux的优势,因为它默认为案例敏感,但似乎文件系统已继承到Docker中 - 这意味着我的Docker Image(node:fermium-buster:fermium-buster) -slim
)正在运行不敏感的文件系统吗?
我的dockerfile.dev
是:
FROM node:fermium-buster-slim
ARG GID=1000
ARG UID=1000
USER ${UID}:${GID}
WORKDIR /usr/app
COPY . .
EXPOSE 3000
ENTRYPOINT [ "npm", "run", "dev" ]
生产图像在Linux系统上运行,这使我认为是这种情况?
I run a website via Docker as I develop on macOS and macOS is set up with a case-insensitive filesystem by default.
When I run the site, I was rendering an image with no issues locally via Docker. When I deployed, it didn't work. Upon inspection I found that the image was This_Is_My_Image.jpg
, yet I was requesting this_is_my_image.jpg
.
My [incorrect] assumption was that using Docker I would gain the advantage of Linux with it being case-sensitive as default but it seems that the file system is inherited into Docker - meaning that my Docker image (node:fermium-buster-slim
) is running a file system which is case-insensitive?
My Dockerfile.dev
is:
FROM node:fermium-buster-slim
ARG GID=1000
ARG UID=1000
USER ${UID}:${GID}
WORKDIR /usr/app
COPY . .
EXPOSE 3000
ENTRYPOINT [ "npm", "run", "dev" ]
The production image runs on a Linux system which makes me think that this is the case?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论