{"id":21403976,"url":"https://github.com/notyusheng/dockerized-offline-react-apps-using-tarballs","last_synced_at":"2026-04-11T05:34:43.773Z","repository":{"id":263810563,"uuid":"891449409","full_name":"NotYuSheng/Dockerized-Offline-React-Apps-Using-Tarballs","owner":"NotYuSheng","description":"Cache React app dependencies offline with tarballs, enabling npm install without internet access during deployment.","archived":false,"fork":false,"pushed_at":"2024-11-20T11:24:51.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T03:29:50.571Z","etag":null,"topics":["docker","npm","package-json","react","tarballs"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotYuSheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T11:02:23.000Z","updated_at":"2024-11-20T11:25:25.000Z","dependencies_parsed_at":"2024-11-20T12:39:08.233Z","dependency_job_id":null,"html_url":"https://github.com/NotYuSheng/Dockerized-Offline-React-Apps-Using-Tarballs","commit_stats":null,"previous_names":["notyusheng/dockerized-offline-react-apps-using-tarballs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2FDockerized-Offline-React-Apps-Using-Tarballs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2FDockerized-Offline-React-Apps-Using-Tarballs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2FDockerized-Offline-React-Apps-Using-Tarballs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotYuSheng%2FDockerized-Offline-React-Apps-Using-Tarballs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotYuSheng","download_url":"https://codeload.github.com/NotYuSheng/Dockerized-Offline-React-Apps-Using-Tarballs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243901170,"owners_count":20366251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","npm","package-json","react","tarballs"],"created_at":"2024-11-22T16:11:19.241Z","updated_at":"2025-12-30T21:25:14.781Z","avatar_url":"https://github.com/NotYuSheng.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerized Offline React Apps Using Tarballs\nCache React app dependencies offline with tarballs, enabling `npm install` without internet access during deployment.\n\n## Prerequisites\n- Local installation of Node.js and npm.\n- A basic React app with a package.json file.\n- Docker installed (if using containerized builds).\n\n## Steps to follow\n1. Download the `create-tarballs.sh` script and ensure it is set to executable before running it.\n```\ngit clone https://github.com/NotYuSheng/Dockerized-Offline-React-Apps-Using-Tarballs.git\ncd Dockerized-Offline-React-Apps-Using-Tarballs\n```\n2. Run the `create-tarballs.sh` script in the directory containing your `package.json`.\n```\n./create-tarballs.sh\n```\nThis will:\n- Install the dependencies using `npm install`.\n- Create tarballs for each dependency.\n- Save the tarballs in the `tarballs/` directory.\n3. Modify the Dockerfile Use the `example/Dockerfile` as a reference for building your app with tarballs.\n- Copy the tarballs directory into the Docker image.\n- Update the `npm install` command to install from tarballs.\n4. Build and run your docker container\n\n## Important Note: EOL Conversion for Shell Scripts\n\nIf you encounter issues running the `create-tarballs.sh` script, it may be due to differences in end-of-line (EOL) characters. This is a common issue when shell scripts are created or edited on Windows systems, as they use Windows-style EOL (`\\r\\n`) instead of the Unix-style EOL (`\\n`) required by Linux.\n\nTo resolve this issue, ensure the script uses Unix-style EOL. You can convert the script using the tool provided in [NotYuSheng/eol-converter](https://github.com/NotYuSheng/eol-converter). This applies regardless of whether you're running the script on Linux or Docker containers.\n\n#### Quick Fix\nIf you suspect this issue:\n1. Use `dos2unix` (if installed) to convert the script:\n ```bash\n dos2unix create-tarballs.sh\n ```\n2. Alternatively, run the [EOL converter tool](https://github.com/NotYuSheng/eol-converter) for a more streamlined fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotyusheng%2Fdockerized-offline-react-apps-using-tarballs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotyusheng%2Fdockerized-offline-react-apps-using-tarballs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotyusheng%2Fdockerized-offline-react-apps-using-tarballs/lists"}