Skip to content

feature: development container#64

Merged
BrianDangDev merged 6 commits into
thoth-tech:mainfrom
SteveDala:main
Dec 5, 2025
Merged

feature: development container#64
BrianDangDev merged 6 commits into
thoth-tech:mainfrom
SteveDala:main

Conversation

@SteveDala
Copy link
Copy Markdown
Collaborator

@SteveDala SteveDala commented Dec 2, 2025

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)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  1. Open the repository folder in VSCode. VSCode should have the "Remote Development Extension Pack" installed.
  2. Using the command palette (Ctrl + Shift + P on Windows), use the command "Reopen in Container".
  3. It may take some time to build the container, but before long the Astro dev server should start within the container and become available at localhost:4322 in any browser window.
  4. When saving edits to any documentation, Vite should detect the change and the page should update.

Testing Checklist

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from the Documentation Team on the Pull Request

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 2, 2025

Deploy Preview for ontrackdocumentation ready!

Name Link
🔨 Latest commit 3fac569
🔍 Latest deploy log https://app.netlify.com/projects/ontrackdocumentation/deploys/69302a55e7675f00083fffb1
😎 Deploy Preview https://deploy-preview-64--ontrackdocumentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SteveDala SteveDala marked this pull request as ready for review December 2, 2025 13:31
Copy link
Copy Markdown

@Rana7xi Rana7xi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

@SteveDala
Copy link
Copy Markdown
Collaborator Author

Thanks @Rana7xi, I have fixed that now.

@sabdosh
Copy link
Copy Markdown

sabdosh commented Dec 3, 2025

Hi Steven, it works on my side. I was able to run the localhost:4322 on my browser with no errors.

@SteveDala
Copy link
Copy Markdown
Collaborator Author

@BrianDangDev lets get this merged to assist the Documentation team with container-based development of this doc site.

@SteveDala SteveDala requested a review from Rana7xi December 3, 2025 07:53
Comment thread .devcontainer/package-lock.json
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.
@SteveDala SteveDala mentioned this pull request Dec 4, 2025
13 tasks
@SteveDala
Copy link
Copy Markdown
Collaborator Author

@BrianDangDev, could we get this merged if all good?

@BrianDangDev BrianDangDev merged commit ed82e70 into thoth-tech:main Dec 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants