feature: development container#64
Conversation
✅ Deploy Preview for ontrackdocumentation ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Hi Steven,
I tested the development container for this PR and ran into issue when I reopen the repository in a dev container.
The Dev Containers log showed the following error:
no port specified: ..:/site<empty>
This was caused by the ..:/site entry placed under ports in
.devcontainer/docker-compose.yml. Docker Compose take it as a
port instead of volume.
After moving ..:/site from the ports section into the volumes section, the dev container successfully worked.
Here is the change that worked for me:
services:
astro-dev:
build:
context: ../
dockerfile: Dockerfile
ports:
- "4321:4321"
volumes:
- ..:/site
- astro-node_modules:/site/node_modules
volumes:
astro-node_modules:|
Thanks @Rana7xi, I have fixed that now. |
|
Hi Steven, it works on my side. I was able to run the localhost:4322 on my browser with no errors. |
|
@BrianDangDev lets get this merged to assist the Documentation team with container-based development of this doc site. |
Removing `package-lock.json` would cause subsequent full builds of the container to fail. This is because git is a requirement of some dependencies of packages listed in `package.json`. Git and curl have now been added to the Dockerfile. In addition, the `package-lock.json` has been regenerated with the latest dependency versions.
|
@BrianDangDev, could we get this merged if all good? |
Description
The motivation behind this work is to create a reproducible environment to work on the OnTrack documentation. Further to not wanting to install node.js on my Windows machine, I prefer to open a Docker or development container and just go from there. This should also solve any cross-platform dependency problems among team members.
Type of change
Bug fix (non-breaking change which fixes an issue)How Has This Been Tested?
localhost:4322in any browser window.Testing Checklist
Tested in latest ChromeTested in latest SafariTested in latest FirefoxChecklist