![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
docker-service-manager
Advanced tools
This tool allows the user to manage services run within docker containers. I created this tool out of the necessity to have a multitude of services running on a single private server. These services might at times depend on each other and each expose different ports.
After messing around with virtual machines for quite some time, I finally settled on running each service in its own docker container. This application helps me (and maybe you), to easily mount folders and config files, to expose necessity ports and to build and start all necessity images and containers.
It also takes care of setting the containers timezone, so no time mismatches happen between the service and the host.
Each service lives inside its own folder. This folder may be located anywhere, and will be symlinked into /etc/docker-services
by using
$ docker-service add /some/services/folder
This folder will not be deleted upon uninstalling this module, so you should take care of this on your own!
A service contains at its heart a service.json
file, which may look like this:
{
"tag": "paulavery/ympd",
"name": "ympd",
"ports": [8000],
"memory": "1g",
"mounts": {
"music": "/etc/mopidy/music"
},
"deps": [
"mpd"
]
}
All its attributes are optional with the exception of a tag
which we require.
If a local Dockerfile is found, a new image will be built from it, under this tag. Otherwise, the tag will be pulled from the docker registry.
A name to later be used as the services container name. You will use this to reference services (start or stop them as well as have other services depend on them).
If omitted it will default to the part behind the /
of your tag
.
I would suggest to use this property to allow for drop-in replacements of dependencies (e.g. a mopidy
and an mpd
service could both have different tags but the name mpd
, as they are providing the same service for dependents).
An array defining the ports this service will expose to you. This should not contain any ports not exposed to the user.
A string which is passed using the --memory
option to docker run
.
Define names for any directories which need to be mounted into your services container. See about the mounts directory below.
An array listing all dependencies of this service. These dependencies will be started before loading up your service.
mounts
directoryYou should symlink your mounts here under the name defined in your service.json
. This allows you to check in the required mounts to git, while easily assigning them on each machine.
If you have no mounts, you do not need this directory.
config
directoryThis directory contains any configuration files for your service. These are linked into the services container, so you may change them without much fuss.
You should treat this directory like a Linux systems root folder. So config/etc/something.conf
will be linked to /etc/something.conf
inside the container.
If you have no configuration files, you may omit this folder.
In addition, you may specify entire folders in your service.json
's configs
property. The following would mount config/home/sabnzbd/.sabnzbd
and config/home/sabnzbd/downloads
to /home/sabnzbd/.sabnzbd
and /home/sabnzbd/downloads
respectively:
{
configs: {
'home/sabnzbd': {
'.sabnzbd': {},
'downloads': {}
}
}
}
Single files will still be mounted separately unless they are positioned in a folder which will be mounted.
The application exposes the following commands:
Builds any necessary images and containers as well as starting all dependencies before starting up your service. First time doing this might take some time.
A -d
/--nodaemon
flag may be passed, to start a service in non-daemon mode.
Stops the container running your service
Restarts a service.
Prints status information as JSON to the command line.
Lists all installed services with their current status.
This application does NOT print user-friendly error messages. If anything goes wrong (e.g. a dependency is missing), it just throws an error and crashes. The error messages should be self-explanatory though.
FAQs
Manage docker containers as services
The npm package docker-service-manager receives a total of 0 weekly downloads. As such, docker-service-manager popularity was classified as not popular.
We found that docker-service-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.