Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Dev
  • Docker

Docker · Changes

Page history
restructure authored May 25, 2021 by Andrea Pavlovic's avatar Andrea Pavlovic
Show whitespace changes
Inline Side-by-side
Dev/Docker.md 0 → 100644
View page @ 1ac51e9a
## Dependencies
The [Dockerfile](ironapi-gw/Dockerfile) in the main repo is based on a docker image built
with [Dockerfile_Deps](ironapi-gw/Dockerfile_Deps).
```
~/ironapi/ironapi-gw/etc[master]$ docker build -t ironapi/ironapi-gw-deps .
```
## Copy vs Mount
When the main docker image is built,
```
~/ironapi/ironapi-gw[master]$ docker build -t ironapi/ironapi-gw .
```
it takes a copy of the current directory to be mounted in /app on startup.
```
docker run -t -p 3000:3000 --name ironapigw
```
Beware: any code changes after building the image will not be available when you run the image! So, `db.conf` needs to be written before building the image, or the current directory can be mounted (this overrides the copy directive in the Dockerfile):
```
docker run -t -p 3000:3000 --name ironapigw --mount type=bind,source="$(pwd)",target=/app ironapi-gw
```
## Logging
Docker redirects anything written to STDOUT or STDERR to the configured log driver. To change it from the default "json-file" to syslog, either configure it for the entire host system:
```
root@ninne:/etc/docker# more daemon.json
{
"log-driver" : "syslog"
}
```
or set it a run time:
`docker run -t --log-driver syslog`
Them messages end up in the syslog `tail -f /var/log/syslog`
All scripts use the same [[logging configuration|Logging]], which currently sends everything to STDOUT as well as a log file. Note the -t option - it allocates a pseudo-TTY, which also gets us the catalyst access log on STDERR.
\ No newline at end of file
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages