Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docker support #3891

Closed
wants to merge 5 commits into from
Closed

feat: add docker support #3891

wants to merge 5 commits into from

Conversation

bestony
Copy link

@bestony bestony commented Nov 29, 2019

What does it do?

add Docker Support for Hexo Cli.

How to test

  1. install Docker
git clone -b add-dockerfile https://github.com/bestony/hexo.git
cd hexo
./hexod # use this to show hexo info 
./hexod init testdocker

Other info

  1. About hexo in Docker Hub

is hexo belongs to hexo?

Now, i push the image to my docker hub account, If this belongs to Hexo Official, I can push image to Hexo Organization.

Screenshots

image

image

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

usage:

- ./hexod hexo init
- ./hexod hexo clean
usage:

- ./dockerd hexo s
@bestony bestony changed the title Add dockerfile feat: add docker support Nov 29, 2019
@bestony
Copy link
Author

bestony commented Nov 29, 2019

@SukkaW

  • Docker image to avoid the environment setting issue.

#2492

@coveralls
Copy link

coveralls commented Nov 29, 2019

Coverage Status

Coverage remained the same at 97.146% when pulling 8463cd6 on bestony:add-dockerfile into 2146a03 on hexojs:master.

Dockerfile Outdated Show resolved Hide resolved
hexod Outdated Show resolved Hide resolved
@bestony
Copy link
Author

bestony commented Nov 29, 2019

@SukkaW

Done with 5fe7235

Usage:

  1. hexod init <name>
  2. hexod version

&& new Image only 112 MB (compare with 912 MB for node:10)

Dockerfile Outdated Show resolved Hide resolved
@bestony
Copy link
Author

bestony commented Nov 29, 2019

@SukkaW Done.
New Image with ash only 107MB.

@curbengh
Copy link
Contributor

is hexo belongs to hexo?

I don't know about this. cc @NoahDragon

@bestony
Copy link
Author

bestony commented Nov 30, 2019

if no one have the hexo organization, I create a hexojs organization, I can push to this organ namespace

link: https://hub.docker.com/orgs/hexojs

@NoahDragon NoahDragon mentioned this pull request Nov 30, 2019
53 tasks
@curbengh curbengh added this to the Candidate next release milestone Nov 30, 2019
@curbengh curbengh removed this from the 4.2.0 milestone Dec 20, 2019
@SukkaW
Copy link
Member

SukkaW commented Jan 1, 2020

@bestony I have realized something: wrap hexo in hexod looks simpler, but npm will become inaccessible. Maybe another wrapper npmd for npm as well?

@bestony
Copy link
Author

bestony commented Jan 1, 2020

It's ok, But it must have to file to link docker command.
maybe add an alias to hexod is better?
just like

Hexod init  -> hexo init
hexod npm install -> npm install 

it maybe better than npmd ?

@SukkaW
Copy link
Member

SukkaW commented Jan 1, 2020

@bestony Agree, LGTM.

@bestony
Copy link
Author

bestony commented Jan 2, 2020

ok, I will try to add this feature

@curbengh
Copy link
Contributor

curbengh commented Jan 9, 2020

if no one have the hexo organization, I create a hexojs organization, I can push to this organ namespace

link: https://hub.docker.com/orgs/hexojs

I just created a docker account, feel free to add me https://hub.docker.com/u/curben

@SukkaW
Copy link
Member

SukkaW commented Jan 10, 2020

I just created a docker account, feel free to add me https://hub.docker.com/u/curben

And this is mine: https://hub.docker.com/u/sukka

@SukkaW
Copy link
Member

SukkaW commented Feb 27, 2020

IMHO, we should close this PR and create a new repo then.

Dockerfile is no need to be published to npm. So it is unnecessary to have it in the repo. Also, Docker image is built with npm install instead of relying pm any files under hexojs/hexo.

@bestony What about creating a new GitHub repo hexo-docker and then transfer it to hexojs org then?

@bestony
Copy link
Author

bestony commented Feb 27, 2020

good idea. i will create a new repo,and try to transfer to hexojs

@bestony
Copy link
Author

bestony commented Mar 26, 2020

@SukkaW @curbengh Hi, I create a new repo for this pr, and i want to transfer it to hexojs. but alert "You don’t have the permission to create public repositories on hexojs".

so, what should i do next ?

My repo is here -> https://github.com/bestony/hexo-docker

@bestony
Copy link
Author

bestony commented Mar 26, 2020

and i add github action to automate publish docker images, and now ,you can download images by docker run hexojs/hexojs

https://hub.docker.com/repository/docker/hexojs/hexojs

@SukkaW
Copy link
Member

SukkaW commented Mar 27, 2020

@NoahDragon Would you please add @bestony to Hexo's plugin team? So he could transfer his repo to @hexojs's org.

@github-actions github-actions bot added the stale label Nov 29, 2021
@github-actions github-actions bot closed this Dec 7, 2021
@bestony
Copy link
Author

bestony commented Dec 7, 2021

any one can check this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants