-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Docker image, automatic builds. #171
Comments
Hi, thanks, nice idea. Where this image will be pushed? I don't know much about sharing docker images |
I'll take a look at Travis-ci configuration if possible. Since it's an open
source project, travis ci should work.
Also since it's an open source project, our docker image should be hosted
on docker hub. I want you to make an account on docker hub, create
organization and invite me. My docker username is shinebayar. Then our
docker image will be available as under that organization's repository.
…On 01:32, Fri, Jan 25, 2019 Iaroslav Shepilov ***@***.*** wrote:
Hi, thanks, nice idea. Where this image will be pushed? I don't know much
about sharing docker images
Regarding the build tool - at the moment the whole process is in Travis
CI: python and js tests, js build, whole package build
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC8sZgXWOpt7nOp-lisucQthQGgcA2m5ks5vGe46gaJpZM4aRW5o>
.
|
Hi @shinebayar-g after some struggling I created an organization on docker hub and added you to a team. I believe I also have to create a repository and grant you permissions to it, right? |
Hi, I just checked docker repository. Looks like I don't have permission to create repo. Please create repository and add me. I'll test permissions to push, tag and delete. |
Added. Also I added automatic builds there: so whenever a commit to master happens, it will build :dev image based on Dockerfile. So there is no need to update any CI tool, just add a Dockerfile |
Great. |
Now images are pushed. Still to be done:
|
Added pushing docker image for stable releases as well + added incremental versioning to them To be done:
|
Description how to use it(credits go to @shinebayar-g) Users should mount config files and scripts into docker image. Example usage:
Example runner: $ cat /host/path/to/runners/sample.json
{
"name": "sample script",
"description": "sample script description",
"script_path": "/app/scripts/sample.sh"
} Example script: $ cat /host/path/to/scripts/sample.sh
#!/bin/bash
echo "Hello sample script" Notes: Script-server users should know it cannot access host system processes as it's nature of docker container. If script-server must has access to host system processes then docker image is not suited for this kind of task. (But not saying it's impossible) |
Hi, You forgot to install the required ldap3 python module in the docker image I think.
|
Hi @tristanlatr, thanks for reporting! The thing is, that it's not a required dependency: people can use Script server without auth at all, or with google oauth. And to make the image small, I ignored all optional dependencies However, I'm thinking about making a "fat" image, in addition to a minimal one. With all the optional dependencies + some linux utilities out of the box. But that's not coming in the nearest week. |
Hi, @bugy , I see, right.. Thanks, |
Hi @tristanlatr, I believe you will have to build an own image:
Then And after that you would be able to run the command above, but instead use your image name (my-script-server in this example) |
In addition to "Description how to use it" for docker installation, you have to create a
You can find IP of your docker container with this command: Without this config content the docker wasn't starting up for me. |
Hi @MadDud thanks for the info! PS having explicit port 5000 is not needed |
Hi @bugy, great job on the script. I'm loving it.
Edit: i tested few things and a |
Yep, empty file is not a valid JSON :) |
@bugy Could you correct the https://hub.docker.com/r/bugy/script-server page, which says:
|
Oops, thank for pointing that out! |
Since the task is done, I'm closing it. If anyone has questions/problems with running the docker, please create a new git issue. @aschodinnadcat I moved you comment to a separate issue #228 |
I had write a medium article for the installation & usage. |
oh nice, thank ou @hiteshkumarthakur ! |
I too was semi-expecting the ldap3 package to be included, since it seemed supported out of the box...and semi-expecting it to be missing since missing packages are a classic Python problem. I don't think required components for features an app ships with - even if not enabled by default - should be left out of an image. Sure, you can install it in the container (assuming Firewall rules don't make that a hassle) or create a custom image. And it's perfectly normal to expect to install requirements when running script-server 'bare metal'. But with images it's something else imo. Might be a matter of taste, what images should come with - especially where Python is involved and its modular nature. But from experience, unless otherwise noted in the image name or tag, I expect images to be complete for all supported features. If not, then the image is more of a My two cents on whether to optimize image sizes or not :) How many more packages/bytes would need to be included in a full featured image? |
Hi @SaberStrat it makes sense :) Either current image can be called |
would it be possible to add maybe something to the admin page where we can pip install stuff? otherwise is the only way to run python scripts that require external modules to create a bespoke image? |
Unless you're running the Script server container, you should be able to
just install them at the shell.
Since pip no longer has built-in search functionality, it would have to
either run as admin, which scriptserver probably isn't, or it would run as
the user scriptserver runs as. And in order to develop the script you're
running in the first place, you'd have had to already installed the modules
before you configured scriptserver to run the script through the GUI.
If you really want to pip install things from the GUI, you can probably
write a script in and of itself that wraps pip. Or just configure
scriptserver to run pip with your preferred arguments.
…On Tue, Sep 12, 2023, 11:18 AM Rob Hulley ***@***.***> wrote:
would it be possible to add maybe something to the admin page where we can
pip install stuff?
otherwise is the only way to run python scripts that require external
modules to create a bespoke image?
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HBI3UIVUOXZG6GXQCFLQLX2B4NVANCNFSM4GSFNZUA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yeah I'm running it in docker. If running pip from a script works I can work with that for some reason I just thought it wouldn't. In the meantime I've got a dockefile working with compose to pip install my requirements file during creation but I don't really want to recreate the container every time a script needs a module. |
You'd probably have to try execing into your container to see if you can
install pip and run it from the CLI, but if you can, writing a wrapper
script is probably the easiest, if not just invoking pip directly.
A wrapper could be smart enough to go parse the includes in your scripts
configured under scriptserver (parse the runners directory to find tany
invoked python scripts, then grep out includes in those scripts). Then you
could just use a single no-parameters script to "go pip-install any
includes from any python script I'm running in the container".
…On Tue, Sep 12, 2023, 5:12 PM Rob Hulley ***@***.***> wrote:
Yeah I'm running it in docker. If running pip from a script works I can
work with that for some reason I just thought it wouldn't.
In the meantime I've got a dockefile working with compose to pip install
my requirements file during creation but I don't really want to recreate
the container every time a script needs a module.
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HBI3XEYYQBM6ZACI44FP3X2DF4XANCNFSM4GSFNZUA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yeah shelling in and doing it works fine that was the first thing I tried just seemed like I was missing something obvious and easier. |
Are there plans to make images for ARM? |
There is an arm64 image currently published under a 'dev' tag, which is built from master - so perhaps not yet 'stable'. |
I would like to run following script. jdownloader_enable.sh sudo systemctl daemon-reload
sudo systemctl start jdownloader.service
sudo systemctl enable jdownloader.service |
I'm having some issues with deployment [root@localhost conf.json]# docker logs bcaeada23707 |
It would be nice to have docker image ready.
I'll try to build docker image for the project and make it build automatically for every commit that passes test (do we have one?).
We've production ready drone setup that we use daily. If you don't mind I'd use that.
The text was updated successfully, but these errors were encountered: