Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dancejl/dancedocker.jl
Docker plugin for DanceJL
https://github.com/dancejl/dancedocker.jl
dance devops docker framework julia web
Last synced: 7 days ago
JSON representation
Docker plugin for DanceJL
- Host: GitHub
- URL: https://github.com/dancejl/dancedocker.jl
- Owner: DanceJL
- License: mit
- Created: 2020-04-18T19:52:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-04T07:35:32.000Z (over 4 years ago)
- Last Synced: 2024-12-11T06:16:38.544Z (about 1 month ago)
- Topics: dance, devops, docker, framework, julia, web
- Language: Julia
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dance
Plugin to automatically generate Dockerfile for DanceJL project.
| **Build Status** |
|:------------------------------------------------------:|
| [![Build Status](https://travis-ci.com/DanceJL/DanceDocker.jl.svg?branch=master)](https://travis-ci.com/DanceJL/DanceDocker.jl) [![codecov](https://codecov.io/gh/DanceJL/DanceDocker.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/DanceJL/DanceDocker.jl)|## 1 - Installation
Package can be installed with Julia's package manager, either by using Pkg REPL mode (*press ]*):
```
pkg> add DanceDocker
```or by using Pkg functions
```julia
julia> using Pkg; Pkg.add("DanceDocker")
```Compatibility is with Julia 1.1 and Dance 0.2.1 upward.
## 2 - Setup
**Please make sure your project contains a `Project.toml` file in its root, at same level as `dance.jl` file.**
**If testing Docker on `localhost`, is recommended to set DanceJL setting's `:server_host` parameter to `0.0.0.0`.**
Else connections from host to Docker container might not work smoothly.Invoke terminal in project root directory and:
```julia
using DanceDocker
setup()
```Optionally if you wish to use different Julia version than one used on your machine, one can do so via `version` kwarg.
For example:```julia
using DanceDocker
setup(;version=1.4)
```## 3 - Docker Integration
Following section requires Docker to be installed on system.
### 3.1 - Building Docker Image
To build Docker image:
```
docker build -t : .
```where
- `name` is name of output DOcker image.
- `version` is optional, as Docker will default tag to `latest`.### 3.2 - Running Docker Image
To run built Docker image:
```
docker run -d -p : :
```where:
- `host port` and `docker port` correspond to ports on host and what was specified under Dockerfile respectively. For example: `8000:8000`.
- `build name` is the name of Docker image, as specified under previous section.
- `build version` is optional, depending on if specified under previous section.Above command will output a Docker container id.
Hence when finished, simply end Docker instance by running:```
docker container stop
```