{"id":18648298,"url":"https://github.com/antlafarge/http-share","last_synced_at":"2025-07-05T04:01:50.565Z","repository":{"id":147905892,"uuid":"358959214","full_name":"antlafarge/http-share","owner":"antlafarge","description":"Share a directory through HTTP (protected by htaccess password) by using nginx.","archived":false,"fork":false,"pushed_at":"2025-01-08T22:12:28.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-08T23:24:49.283Z","etag":null,"topics":["docker","docker-container","htpasswd","http","nginx"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/antlafarge/http-share","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antlafarge.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-04-17T18:57:16.000Z","updated_at":"2025-01-08T22:12:32.000Z","dependencies_parsed_at":"2024-11-07T06:31:53.737Z","dependency_job_id":"70c87bdb-2ce7-4bbe-a5f0-83ee1fe621aa","html_url":"https://github.com/antlafarge/http-share","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlafarge%2Fhttp-share","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlafarge%2Fhttp-share/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlafarge%2Fhttp-share/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlafarge%2Fhttp-share/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antlafarge","download_url":"https://codeload.github.com/antlafarge/http-share/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239450248,"owners_count":19640688,"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","docker-container","htpasswd","http","nginx"],"created_at":"2024-11-07T06:30:01.361Z","updated_at":"2025-02-18T10:23:47.666Z","avatar_url":"https://github.com/antlafarge.png","language":"Dockerfile","readme":"# HTTP-SHARE\n\nShare a directory through HTTP (protected by htaccess password) by using nginx.\n\n## Docker\n\n\u003cpre\u003e\n# Create the login/password to access the http share.\necho \"\u003cb\u003e\u0026#60;LOGIN\u0026#62;\u003c/b\u003e:$(perl -le 'print crypt(\"\u003cb\u003e\u0026#60;PASSWORD\u0026#62;\u003c/b\u003e\", \"1xzcq\")')\" \u003e ~/http-share.htpasswd\n\ndocker run -d \\\n        --name \u003cb\u003e\u0026#60;CONTAINER-NAME\u0026#62;\u003c/b\u003e \\\n        --restart \u003cb\u003e\u0026#60;RESTART\u0026#62;\u003c/b\u003e \\\n    -v \u003cb\u003e\u0026#60;PATH\u0026#62;\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003e\u0026#60;SHARE-NAME\u0026#62;\u003c/b\u003e:ro \\\n    -v ~/http-share.htpasswd:/etc/nginx/conf.d/.htpasswd:ro \\\n        -p \u003cb\u003e\u0026#60;PORT\u0026#62;\u003c/b\u003e:80 \\\n    antlafarge/http-share:latest\n\u003c/pre\u003e\n*Parameters indented twice are optional.*\n\n- Replace **`\u003cLOGIN\u003e`** and **`\u003cPASSWORD\u003e`** by the login and password which will be required to access the http share.\n- Replace **`\u003cCONTAINER-NAME\u003e`** by the name you want for the container.\n- Replace **`\u003cRESTART\u003e`** by `on-failure`, `unless-stopped` or `always`.\n- Replace **`\u003cPORT\u003e`** by the http port you will open in your router NAT.\n- Replace **`\u003cPATH\u003e`** by the absolute path to the directory you want to share and **`\u003cSHARE-NAME\u003e`** by the name you want for the shared directory. The share-name is optional if you need to share only 1 directory. You can add many volumes if you want to share multiple directories (see examples).\n\n*Note : Do not delete the file `http-share.htpasswd` on your host machine, it will be used by the container.*\n\n### Example\n\n\u003cpre\u003e\n# Create the login/password to access the http share.\necho \"\u003cb\u003eadmin\u003c/b\u003e:$(perl -le 'print crypt(\"\u003cb\u003eMyGreatPassword\u003c/b\u003e\", \"1xzcq\")')\" \u003e ~/http-share.htpasswd\n\ndocker run -d \\\n        --name http-share \\\n        --restart \u003cb\u003eon-failure:2\u003c/b\u003e \\\n    -v \"\u003cb\u003e/mnt/hdd/public\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003ePublic\u003c/b\u003e:ro\" \\\n    -v \"\u003cb\u003e/mnt/hdd/shared\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003eShared\u003c/b\u003e:ro\" \\\n    -v \"~/http-share.htpasswd:/etc/nginx/conf.d/.htpasswd:ro\" \\\n        -p \u003cb\u003e8080\u003c/b\u003e:80 \\\n    antlafarge/http-share:latest\n\u003c/pre\u003e\n*Parameters indented twice are optional.*\n\n## Docker compose\n\n\u003cpre\u003e\necho \"\u003cb\u003e\u0026#60;LOGIN\u0026#62;\u003c/b\u003e:$(perl -le 'print crypt(\"\u003cb\u003e\u0026#60;PASSWORD\u0026#62;\u003c/b\u003e\", \"1xzcq\")')\" \u003e ~/http-share.htpasswd\n\u003c/pre\u003e\n\n\u003cpre\u003e\nservices:\n    http-share:\n        image: antlafarge/http-share:latest\n        container_name: \u003cb\u003e\u0026#60;CONTAINER-NAME\u0026#62;\u003c/b\u003e # optional\n        restart: \u003cb\u003e\u0026#60;RESTART\u0026#62;\u003c/b\u003e # optional\n        volumes:\n            - \"\u003cb\u003e\u0026#60;PATH\u0026#62;\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003e\u0026#60;SHARE-NAME\u0026#62;\u003c/b\u003e:ro\"\n            - \"~/http-share.htpasswd:/etc/nginx/conf.d/.htpasswd:ro\"\n        ports:\n            - \"\u003cb\u003e\u0026#60;PORT\u0026#62;\u003c/b\u003e:80\" # optional\n\u003c/pre\u003e\n\n### Example\n\n\u003cpre\u003e\necho \"\u003cb\u003eadmin\u003c/b\u003e:$(perl -le 'print crypt(\"\u003cb\u003eMyGreatPassword\u003c/b\u003e\", \"1xzcq\")')\" \u003e ~/http-share.htpasswd\n\u003c/pre\u003e\n\n\u003cpre\u003e\nservices:\n    http-share:\n        image: antlafarge/http-share:latest\n        container_name: \u003cb\u003ehttp-share\u003c/b\u003e # optional\n        restart: \u003cb\u003eon-failure:2\u003c/b\u003e # optional\n        volumes:\n            - \"\u003cb\u003e/mnt/hdd/public\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003ePublic\u003c/b\u003e:ro\"\n            - \"\u003cb\u003e/mnt/hdd/shared\u003c/b\u003e:/usr/share/nginx/html/\u003cb\u003eShared\u003c/b\u003e:ro\"\n            - \"~/http-share.htpasswd:/etc/nginx/conf.d/.htpasswd:ro\"\n        ports:\n            - \"\u003cb\u003e8080\u003c/b\u003e:80\" # optional\n\u003c/pre\u003e\n\n## Docker commands reminder\n\n### Container stop\n\n\u003cpre\u003e\ndocker stop \u003cb\u003ehttp-share\u003c/b\u003e\n\u003c/pre\u003e\n\n### Container restart\n\n\u003cpre\u003e\ndocker restart \u003cb\u003ehttp-share\u003c/b\u003e\n\u003c/pre\u003e\n\n### Container logs\n\n\u003cpre\u003e\ndocker logs --follow --tail 100 \u003cb\u003ehttp-share\u003c/b\u003e\n\u003c/pre\u003e\n\n### Container delete\n\n\u003cpre\u003e\ndocker rm -f \u003cb\u003ehttp-share\u003c/b\u003e\n\u003c/pre\u003e\n\n### Image delete\n\n\u003cpre\u003e\ndocker rmi antlafarge/http-share:\u003cb\u003elatest\u003c/b\u003e\n\u003c/pre\u003e\n\n### Compose start\n\n\u003cpre\u003e\ncd /path/to/docker-compose.yml/directory/\ndocker compose up -d\n\u003c/pre\u003e\n\n### Compose stop\n\n\u003cpre\u003e\ncd /path/to/docker-compose.yml/directory/\ndocker compose down\n\u003c/pre\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlafarge%2Fhttp-share","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantlafarge%2Fhttp-share","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlafarge%2Fhttp-share/lists"}