doppler dockerfile added + workflow

This commit is contained in:
MXPicture 2022-02-10 14:13:50 +01:00
parent 58a1579832
commit c1b6b91404
13 changed files with 251 additions and 524 deletions

14
.github/FUNDING.yml vendored
View File

@ -1,14 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
- cimnine
- tobiasge
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@ -1,148 +0,0 @@
name: Bug report
description: Create a report about a malfunction of the Docker setup
body:
- type: markdown
attributes:
value: |
Please only raise an issue if you're certain that you've found a bug.
Else, see these other means to get help:
- See our troubleshooting section:
https://github.com/netbox-community/netbox-docker/wiki/Troubleshooting
- Have a look at the rest of the wiki:
https://github.com/netbox-community/netbox-docker/wiki
- Check the release notes:
https://github.com/netbox-community/netbox-docker/releases
- Look through the issues already resolved:
https://github.com/netbox-community/netbox-docker/issues?q=is%3Aclosed
If you did not find what you're looking for,
try the help of our community:
- Post to Github Discussions:
https://github.com/netbox-community/netbox-docker/discussions
- Join the `#netbox-docker` channel on our Slack:
https://join.slack.com/t/netdev-community/shared_invite/zt-mtts8g0n-Sm6Wutn62q_M4OdsaIycrQ
- Ask on the NetBox mailing list:
https://groups.google.com/d/forum/netbox-discuss
Please don't open an issue to open a PR.
Just submit the PR, that's good enough.
- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: Please describe what you did and how you think it misbehaved
placeholder: I tried to … by doing …, but it …
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: Please describe what you expected instead
placeholder: I expected that … when I do …
validations:
required: true
- type: input
id: docker-compose-version
attributes:
label: Docker Compose Version
description: Please paste the output of `docker-compose version`
placeholder: Docker Compose version vX.Y.Z
validations:
required: true
- type: textarea
id: docker-version
attributes:
label: Docker Version
description: Please paste the output of `docker version`
render: text
placeholder: |
Client:
Cloud integration: 1.0.17
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:55:20 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:10 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0
validations:
required: true
- type: input
id: git-rev
attributes:
label: The git Revision
description: Please paste the output of `git rev-parse HEAD`
validations:
required: true
- type: textarea
id: git-status
attributes:
label: The git Status
description: Please paste the output of `git status`
render: text
placeholder: |
On branch main
nothing to commit, working tree clean
validations:
required: true
- type: input
id: run-command
attributes:
label: Startup Command
description: Please specify the command you used to start the project
placeholder: docker compose up
validations:
required: true
- type: textarea
id: netbox-logs
attributes:
label: NetBox Logs
description: Please paste the output of `docker-compose logs netbox` (or `docker compose logs netbox`)
render: text
placeholder: |
netbox_1 | ⚙️ Applying database migrations
netbox_1 | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox_1 | 🧬 loaded config '/etc/netbox/config/a.py'
netbox_1 | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox_1 | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox_1 | 🧬 loaded config '/etc/netbox/config/plugins.py'
...
validations:
required: true
- type: textarea
id: docker-compose-override-yml
attributes:
label: Content of docker-compose.override.yml
description: Please paste the output of `cat docker-compose.override.yml`
render: yaml
placeholder: |
version: '3.4'
services:
netbox:
ports:
- '8080:8080'
validations:
required: true

View File

@ -1,15 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://github.com/netbox-community/netbox-docker/discussions
about: The Github Discussions are the right place to ask questions about how to use or do certain things with NetBox Docker.
- name: Chat
url: https://join.slack.com/t/netdev-community/shared_invite/zt-mtts8g0n-Sm6Wutn62q_M4OdsaIycrQ
about: 'Usually the quickest way to seek help with small issues is to join our #netbox-docker Slack channel.'
- name: Community Wiki
url: https://github.com/netbox-community/netbox-docker/wiki
about: |
Our wiki contains information for common problems and tips for operating NetBox Docker in production.
It's maintained by our excellent community.

View File

@ -1,68 +0,0 @@
name: Feature or Change Request
description: Request a new feature or a change of the current behavior
body:
- type: markdown
attributes:
value: |
This issue type is to propose new features for the Docker setup.
To just spin an idea, see the Github Discussions section, please.
Before asking for help, see these links first:
- See our troubleshooting section:
https://github.com/netbox-community/netbox-docker/wiki/Troubleshooting
- Have a look at the rest of the wiki:
https://github.com/netbox-community/netbox-docker/wiki
- Check the release notes:
https://github.com/netbox-community/netbox-docker/releases
- Look through the issues already resolved:
https://github.com/netbox-community/netbox-docker/issues?q=is%3Aclosed
If you did not find what you're looking for,
try the help of our community:
- Post to Github Discussions:
https://github.com/netbox-community/netbox-docker/discussions
- Join the `#netbox-docker` channel on our Slack:
https://join.slack.com/t/netdev-community/shared_invite/zt-mtts8g0n-Sm6Wutn62q_M4OdsaIycrQ
- Ask on the NetBox mailing list:
https://groups.google.com/d/forum/netbox-discuss
Please don't open an issue to open a PR.
Just submit the PR, that's good enough.
- type: textarea
id: desired-behavior
attributes:
label: Desired Behavior
description: Please describe the desired behavior
placeholder: To me, it would be useful, if … because …
validations:
required: true
- type: textarea
id: contrast-to-current
attributes:
label: Contrast to Current Behavior
description: Please describe how the desired behavior is different from the current behavior
placeholder: The current behavior is …, but this lacks …
validations:
required: true
- type: textarea
id: required-changes
attributes:
label: Required Changes
description: If you can, please elaborate what changes will be required to implement the desired behavior
placeholder: I suggest to change the file …
validations:
required: false
- type: textarea
id: discussion
attributes:
label: 'Discussion: Benefits and Drawbacks'
description: |
Please make your case here:
- Why do you think this project and the community will benefit from your suggestion?
- What are the drawbacks of this change? Is it backwards-compatible?
- Anything else that you think is relevant to the discussion of this feature/change request.
placeholder: I suggest to change the file …
validations:
required: false

View File

@ -1,10 +0,0 @@
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 30
# Label requiring a response
responseRequiredLabel: awaiting answer
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author.

View File

@ -1,85 +0,0 @@
<!--
#########################################################################
Thank you for sharing your work and for opening a PR.
(!) IMPORTANT (!):
First make sure that you point your PR to the `develop` branch!
Now please read the comments carefully and try to provide information
on all relevant titles.
#########################################################################
-->
<!--
Please don't open an extra issue when submitting a PR.
But if there is already a related issue, please put it's number here.
E.g. #123 or N/A
-->
Related Issue:
## New Behavior
<!--
Please describe in a few words the intentions of your PR.
-->
...
## Contrast to Current Behavior
<!--
Please describe in a few words how the new behavior is different
from the current behavior.
-->
...
## Discussion: Benefits and Drawbacks
<!--
Please make your case here:
- Why do you think this project and the community will benefit from your
proposed change?
- What are the drawbacks of this change?
- Is it backwards-compatible?
- Anything else that you think is relevant to the discussion of this PR.
(No need to write a huge article here. Just a few sentences that give some
additional context about the motivations for the change.)
-->
...
## Changes to the Wiki
<!--
If the README.md must be updated, please include the changes in the PR.
If the Wiki must be updated, please make a suggestion below.
-->
...
## Proposed Release Note Entry
<!--
Please provide a short summary of your PR that we can copy & paste
into the release notes.
-->
...
## Double Check
<!--
Please put an x into the brackets (like `[x]`) if you've completed that task.
-->
* [ ] I have read the comments and followed the PR template.
* [ ] I have explained my PR according to the information in the comments.
* [ ] My PR targets the `develop` branch.

98
.github/workflows/check_changes.yml vendored Normal file
View File

@ -0,0 +1,98 @@
name: Check Changes
on:
schedule:
# 07:00 UTC each day
- cron: '0 7 * * *'
release:
types: [published]
workflow_dispatch:
jobs:
get_releases:
runs-on: ubuntu-latest
outputs:
releases: ${{ steps.get.outputs.result }}
empty_releases: ${{ steps.check.outputs.result }}
steps:
- name: Docker target releases
id: fetch_target_releases
uses: mxpicture/action-docker-hub-fetch-releases@v1
with:
repository: mxpicture/openwrt-rootfs
max_items: "999999"
- name: Docker source releases
id: fetch_source_releases
uses: mxpicture/action-docker-hub-fetch-releases@v1
with:
repository: openwrtorg/rootfs
max_items: "999999"
- name: Get releases, compare docker hub image dates
uses: actions/github-script@v5
id: get
with:
script: |
const releases = (await github.request("https://api.github.com/repos/"
+ context.repo.owner + "/" + context.repo.repo + "/releases")).data
const target_releases = ${{ steps.fetch_target_releases.outputs.results }}
const source_releases = ${{ steps.fetch_source_releases.outputs.results }}
let output = []
for (const release of releases) {
console.log("Processing release: " + release.tag_name)
for (const source_release of source_releases) {
if ( source_release.tag_name === release.tag_name ) {
let found = false
for (const target_release of target_releases) {
if ( source_release.tag_name === target_release.tag_name ) {
found = true
console.log("Last updated (source): " + source_release.last_updated)
console.log("Last updated (target): " + target_release.last_updated)
if ( source_release.last_updated > target_release.last_updated ) {
console.log("Trigger event for release: " + release.tag_name)
output.push({ "name": release.tag_name })
}
}
}
if (found != true) {
console.log("Trigger event for release: " + release.tag_name)
output.push({ "name": release.tag_name })
}
}
}
}
return output
- name: Check releases empty
uses: actions/github-script@v5
id: check
with:
script: |
let output = ${{ steps.get.outputs.result }}
console.log("Count releases: " + (output.length))
if (output.length == 0) {
console.log("empty")
return 'true'
} else {
console.log("not empty")
return 'false'
}
dispatch:
needs: get_releases
if: ${{ fromJSON(needs.get_releases.outputs.empty_releases) == 'false' }}
runs-on: ubuntu-latest
strategy:
matrix:
release: ${{ fromJSON(needs.get_releases.outputs.releases) }}
steps:
- name: Dispatch deploy
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: ${{ github.repository }}
event-type: docker_hub
client-payload: '{"release": "${{ matrix.release.tag_name }}"}'

43
.github/workflows/docker_hub.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Docker Hub Deploy
on:
repository_dispatch:
types: [docker_hub]
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: mxpicture
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract release name
shell: bash
run: echo "##[set-output name=release;]$(echo ${GITHUB_REF#refs/*/})"
if: github.event_name != 'repository_dispatch'
id: extract_release
- name: Build and push (on push)
id: docker_build_push
uses: docker/build-push-action@v2
if: github.event_name != 'repository_dispatch'
with:
push: true
releases: mxpicture/netbox:${{ steps.extract_release.outputs.release }}
build-args: "BASE_IMAGE_VERSION=${{ steps.extract_release.outputs.release }}"
- name: Build and push (on dispatch)
id: docker_build_dispatch
uses: docker/build-push-action@v2
if: github.event_name == 'repository_dispatch'
with:
push: true
releases: mxpicture/netbox:${{ github.event.client_payload.release }}
build-args: "BASE_IMAGE_VERSION=${{ github.event.client_payload.release }}"

View File

@ -0,0 +1,56 @@
name: Force deploy all
on:
workflow_dispatch:
jobs:
get_releases:
runs-on: ubuntu-latest
outputs:
releases: ${{ steps.get.outputs.result }}
empty_releases: ${{ steps.check.outputs.result }}
steps:
- name: Get releases
uses: actions/github-script@v5
id: get
with:
script: |
const releases = (await github.request("https://api.github.com/repos/"
+ context.repo.owner + "/" + context.repo.repo + "/releases")).data
let output = []
for(let i=0; i<releases.length; i++) {
output.push({ "name": releases[i].tag_name })
}
return output
- name: Check releases empty
uses: actions/github-script@v5
id: check
with:
script: |
let output = ${{ steps.get.outputs.result }}
console.log("Count releases: " + (output.length))
if (output.length == 0) {
console.log("empty")
return 'true'
} else {
console.log("not empty")
return 'false'
}
dispatch:
needs: get_releases
if: ${{ fromJSON(needs.get_releases.outputs.empty_releases) == 'false' }}
runs-on: ubuntu-latest
strategy:
matrix:
release: ${{ fromJSON(needs.get_releases.outputs.releases) }}
steps:
- name: Dispatch deploy
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: ${{ github.repository }}
event-type: docker_hub
client-payload: '{"release": "${{ matrix.release.name }}"}'

View File

@ -1,66 +0,0 @@
name: push
on:
push:
branches-ignore:
- release
pull_request:
branches-ignore:
- release
jobs:
lint:
runs-on: ubuntu-latest
name: Checks syntax of our code
steps:
- uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Lint Code Base
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPPRESS_POSSUM: true
LINTER_RULES_PATH: /
VALIDATE_ALL_CODEBASE: false
VALIDATE_DOCKERFILE: false
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
EDITORCONFIG_FILE_NAME: .ecrc
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
PYTHON_FLAKE8_CONFIG_FILE: .flake8
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
build:
continue-on-error: ${{ matrix.docker_from == 'alpine:edge' }}
strategy:
matrix:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build.sh feature
- ./build.sh develop
docker_from:
- '' # use the default of the build script
- alpine:edge
fail-fast: false
runs-on: ubuntu-latest
name: Builds new NetBox Docker Images
steps:
- id: git-checkout
name: Checkout
uses: actions/checkout@v2
- id: docker-build
name: Build the image from '${{ matrix.docker_from }}' with '${{ matrix.build_cmd }}'
run: ${{ matrix.build_cmd }}
env:
DOCKER_FROM: ${{ matrix.docker_from }}
GH_ACTION: enable
- id: docker-test
name: Test the image
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
if: steps.docker-build.outputs.skipped != 'true'

View File

@ -1,87 +0,0 @@
name: release
on:
release:
types:
- published
schedule:
- cron: '45 5 * * *'
jobs:
build:
strategy:
matrix:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build.sh feature
- ./build.sh develop
fail-fast: false
runs-on: ubuntu-latest
name: Builds new NetBox Docker Images
env:
GH_ACTION: enable
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get Version of NetBox Docker
run: |
echo "::set-output name=version::$(cat VERSION)"
shell: bash
-
id: docker-build
name: Build the image with '${{ matrix.build_cmd }}'
run: ${{ matrix.build_cmd }}
-
name: Test the image
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
if: steps.docker-build.outputs.skipped != 'true'
# docker.io
-
name: Login to docker.io
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.dockerhub_username }}
password: ${{ secrets.dockerhub_password }}
if: steps.docker-build.outputs.skipped != 'true'
-
name: Push the image to docker.io
run: ${{ matrix.build_cmd }} --push-only
if: steps.docker-build.outputs.skipped != 'true'
# quay.io
-
name: Login to Quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.quayio_username }}
password: ${{ secrets.quayio_password }}
if: steps.docker-build.outputs.skipped != 'true'
-
name: Build and push the image with '${{ matrix.build_cmd }}'
run: ${{ matrix.build_cmd }} --push
env:
DOCKER_REGISTRY: quay.io
if: steps.docker-build.outputs.skipped != 'true'
# ghcr.io
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: steps.docker-build.outputs.skipped != 'true'
-
name: Build and push the image with '${{ matrix.build_cmd }}'
run: ${{ matrix.build_cmd }} --push
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_ORG: netbox-community
if: steps.docker-build.outputs.skipped != 'true'

17
Dockerfile_doppler Normal file
View File

@ -0,0 +1,17 @@
ARG BASE_IMAGE=netboxcommunity/netbox
ARG BASE_IMAGE_VERSION=latest
FROM $BASE_IMAGE:$BASE_IMAGE_VERSION
WORKDIR /opt/netbox/netbox
# Install Doppler CLI
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg && \
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | apt-key add - && \
echo "deb https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list && \
apt-get update && \
apt-get -y install doppler
ENTRYPOINT [ "/sbin/tini", "--" ]
# Fetch secrets and exec netbox
CMD ["doppler", "run", "--", "/opt/netbox/docker-entrypoint.sh", "/opt/netbox/launch-netbox.sh"]

View File

@ -1,11 +1,11 @@
# netbox-docker # netbox-docker + doppler installed
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/netbox-community/netbox-docker)][github-release] [![GitHub release (latest by date)](https://img.shields.io/github/v/release/MXPicture/docker-netbox)][github-release]
[![GitHub stars](https://img.shields.io/github/stars/netbox-community/netbox-docker)][github-stargazers] [![GitHub stars](https://img.shields.io/github/stars/MXPicture/docker-netbox)][github-stargazers]
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/netbox-community/netbox-docker) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/MXPicture/docker-netbox)
![Github release workflow](https://img.shields.io/github/workflow/status/netbox-community/netbox-docker/release) ![Github release workflow](https://img.shields.io/github/workflow/status/MXPicture/docker-netbox/release)
![Docker Pulls](https://img.shields.io/docker/pulls/netboxcommunity/netbox) ![Docker Pulls](https://img.shields.io/docker/pulls/netboxcommunity/netbox)
[![GitHub license](https://img.shields.io/github/license/netbox-community/netbox-docker)][netbox-docker-license] [![GitHub license](https://img.shields.io/github/license/MXPicture/docker-netbox)][netbox-docker-license]
[The Github repository](netbox-docker-github) houses the components needed to build NetBox as a container. [The Github repository](netbox-docker-github) houses the components needed to build NetBox as a container.
Images are built regularly using the code in that repository and are pushed to [Docker Hub][netbox-dockerhub], [Quay.io][netbox-quayio] and [GitHub Container Registry][netbox-ghcr]. Images are built regularly using the code in that repository and are pushed to [Docker Hub][netbox-dockerhub], [Quay.io][netbox-quayio] and [GitHub Container Registry][netbox-ghcr].
@ -14,17 +14,17 @@ Do you have any questions?
Before opening an issue on Github, Before opening an issue on Github,
please join [our Slack][netbox-docker-slack] and ask for help in the [`#netbox-docker`][netbox-docker-slack-channel] channel. please join [our Slack][netbox-docker-slack] and ask for help in the [`#netbox-docker`][netbox-docker-slack-channel] channel.
[github-stargazers]: https://github.com/netbox-community/netbox-docker/stargazers [github-stargazers]: https://github.com/MXPicture/docker-netbox/stargazers
[github-release]: https://github.com/netbox-community/netbox-docker/releases [github-release]: https://github.com/MXPicture/docker-netbox/releases
[netbox-docker-microbadger]: https://microbadger.com/images/netboxcommunity/netbox [netbox-docker-microbadger]: https://microbadger.com/images/netboxcommunity/netbox
[netbox-dockerhub]: https://hub.docker.com/r/netboxcommunity/netbox/ [netbox-dockerhub]: https://hub.docker.com/r/netboxcommunity/netbox/
[netbox-quayio]: https://quay.io/repository/netboxcommunity/netbox [netbox-quayio]: https://quay.io/repository/netboxcommunity/netbox
[netbox-ghcr]: https://ghcr.io/netbox-community/netbox/ [netbox-ghcr]: https://ghcr.io/netbox-community/netbox/
[netbox-docker-github]: https://github.com/netbox-community/netbox-docker/ [netbox-docker-github]: https://github.com/MXPicture/docker-netbox/
[netbox-docker-slack]: https://join.slack.com/t/netdev-community/shared_invite/zt-mtts8g0n-Sm6Wutn62q_M4OdsaIycrQ [netbox-docker-slack]: https://join.slack.com/t/netdev-community/shared_invite/zt-mtts8g0n-Sm6Wutn62q_M4OdsaIycrQ
[netbox-docker-slack-channel]: https://netdev-community.slack.com/archives/C01P0GEVBU7 [netbox-docker-slack-channel]: https://netdev-community.slack.com/archives/C01P0GEVBU7
[netbox-slack-channel]: https://netdev-community.slack.com/archives/C01P0FRSXRV [netbox-slack-channel]: https://netdev-community.slack.com/archives/C01P0FRSXRV
[netbox-docker-license]: https://github.com/netbox-community/netbox-docker/blob/release/LICENSE [netbox-docker-license]: https://github.com/MXPicture/docker-netbox/blob/release/LICENSE
## Quickstart ## Quickstart
@ -32,7 +32,7 @@ To get _NetBox Docker_ up and running run the following commands.
There is a more complete [_Getting Started_ guide on our wiki][wiki-getting-started] which explains every step. There is a more complete [_Getting Started_ guide on our wiki][wiki-getting-started] which explains every step.
```bash ```bash
git clone -b release https://github.com/netbox-community/netbox-docker.git git clone -b release https://github.com/MXPicture/docker-netbox.git
cd netbox-docker cd netbox-docker
tee docker-compose.override.yml <<EOF tee docker-compose.override.yml <<EOF
version: '3.4' version: '3.4'
@ -42,6 +42,12 @@ services:
- 8000:8080 - 8000:8080
EOF EOF
docker-compose pull docker-compose pull
# Prevent command with Service Token being recorded in bash history
export HISTIGNORE='export DOPPLER_TOKEN*'
export DOPPLER_TOKEN='dp.st.prd.xxxx'
docker-compose up docker-compose up
``` ```
@ -51,11 +57,11 @@ You should see the NetBox homepage.
In the top-right corner you can login. In the top-right corner you can login.
The default credentials are: The default credentials are:
* Username: **admin** - Username: **admin**
* Password: **admin** - Password: **admin**
* API Token: **0123456789abcdef0123456789abcdef01234567** - API Token: **0123456789abcdef0123456789abcdef01234567**
[wiki-getting-started]: https://github.com/netbox-community/netbox-docker/wiki/Getting-Started [wiki-getting-started]: https://github.com/MXPicture/docker-netbox/wiki/Getting-Started
[docker-reception]: https://github.com/nxt-engineering/reception [docker-reception]: https://github.com/nxt-engineering/reception
## Container Image Tags ## Container Image Tags
@ -64,17 +70,17 @@ New container images are built and published automatically every ~24h.
> We recommend to use either the `vX.Y.Z-a.b.c` tags or the `vX.Y-a.b.c` tags in production! > We recommend to use either the `vX.Y.Z-a.b.c` tags or the `vX.Y-a.b.c` tags in production!
* `vX.Y.Z-a.b.c`, `vX.Y-a.b.c`: - `vX.Y.Z-a.b.c`, `vX.Y-a.b.c`:
These are release builds containing _NetBox version_ `vX.Y.Z`. These are release builds containing _NetBox version_ `vX.Y.Z`.
They contain the support files of _NetBox Docker version_ `a.b.c`. They contain the support files of _NetBox Docker version_ `a.b.c`.
You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility. You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility.
These images are automatically built from [the corresponding releases of NetBox][netbox-releases]. These images are automatically built from [the corresponding releases of NetBox][netbox-releases].
* `latest-a.b.c`: - `latest-a.b.c`:
These are release builds, containing the latest stable version of NetBox. These are release builds, containing the latest stable version of NetBox.
They contain the support files of _NetBox Docker version_ `a.b.c`. They contain the support files of _NetBox Docker version_ `a.b.c`.
You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility. You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility.
These images are automatically built from [the `master` branch of NetBox][netbox-master]. These images are automatically built from [the `master` branch of NetBox][netbox-master].
* `snapshot-a.b.c`: - `snapshot-a.b.c`:
These are pre-release builds. These are pre-release builds.
They contain the support files of _NetBox Docker version_ `a.b.c`. They contain the support files of _NetBox Docker version_ `a.b.c`.
You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility. You must use _NetBox Docker version_ `a.b.c` to guarantee the compatibility.
@ -82,19 +88,19 @@ New container images are built and published automatically every ~24h.
For each of the above tag, there is an extra tag: For each of the above tag, there is an extra tag:
* `vX.Y.Z`, `vX.Y`: - `vX.Y.Z`, `vX.Y`:
This is the same version as `vX.Y.Z-a.b.c` (or `vX.Y-a.b.c`, respectively). This is the same version as `vX.Y.Z-a.b.c` (or `vX.Y-a.b.c`, respectively).
It always points to the latest version of _NetBox Docker_. It always points to the latest version of _NetBox Docker_.
* `latest` - `latest`
This is the same version as `latest-a.b.c`. This is the same version as `latest-a.b.c`.
It always points to the latest version of _NetBox Docker_. It always points to the latest version of _NetBox Docker_.
* `snapshot` - `snapshot`
This is the same version as `snapshot-a.b.c`. This is the same version as `snapshot-a.b.c`.
It always points to the latest version of _NetBox Docker_. It always points to the latest version of _NetBox Docker_.
Then there is currently one extra tags for each of the above tags: Then there is currently one extra tags for each of the above tags:
* `-ldap`: - `-ldap`:
These container images contain additional dependencies and configuration files for connecting NetBox to an LDAP directory. These container images contain additional dependencies and configuration files for connecting NetBox to an LDAP directory.
[Learn more about that in our wiki][netbox-docker-ldap]. [Learn more about that in our wiki][netbox-docker-ldap].
@ -102,7 +108,7 @@ Then there is currently one extra tags for each of the above tags:
[netbox-master]: https://github.com/netbox-community/netbox/tree/master [netbox-master]: https://github.com/netbox-community/netbox/tree/master
[netbox-develop]: https://github.com/netbox-community/netbox/tree/develop [netbox-develop]: https://github.com/netbox-community/netbox/tree/develop
[netbox-branches]: https://github.com/netbox-community/netbox/branches [netbox-branches]: https://github.com/netbox-community/netbox/branches
[netbox-docker-ldap]: https://github.com/netbox-community/netbox-docker/wiki/LDAP [netbox-docker-ldap]: https://github.com/MXPicture/docker-netbox/wiki/LDAP
## Documentation ## Documentation
@ -112,7 +118,7 @@ The wiki covers advanced topics such as using files for secrets, configuring TLS
Our wiki is a community effort. Our wiki is a community effort.
Feel free to correct errors, update outdated information or provide additional guides and insights. Feel free to correct errors, update outdated information or provide additional guides and insights.
[netbox-docker-wiki]: https://github.com/netbox-community/netbox-docker/wiki/ [netbox-docker-wiki]: https://github.com/MXPicture/docker-netbox/wiki/
## Getting Help ## Getting Help
@ -123,14 +129,14 @@ which is free to use and where there are almost always people online that can he
If you need help with using NetBox or developing for it or against it's API If you need help with using NetBox or developing for it or against it's API
you may find [the `#netbox` channel][netbox-slack-channel] on the same Slack instance very helpful. you may find [the `#netbox` channel][netbox-slack-channel] on the same Slack instance very helpful.
[netbox-community]: https://github.com/netbox-community/netbox-docker/discussions [netbox-community]: https://github.com/MXPicture/docker-netbox/discussions
## Dependencies ## Dependencies
This project relies only on *Docker* and *docker-compose* meeting these requirements: This project relies only on _Docker_ and _docker-compose_ meeting these requirements:
* The *Docker version* must be at least `19.03`. - The _Docker version_ must be at least `19.03`.
* The *docker-compose version* must be at least `1.28.0`. - The _docker-compose version_ must be at least `1.28.0`.
To check the version installed on your system run `docker --version` and `docker-compose --version`. To check the version installed on your system run `docker --version` and `docker-compose --version`.
@ -141,8 +147,8 @@ Note that the version of the NetBox Docker container image must stay in sync wit
If you update for the first time, be sure [to follow our _How To Update NetBox Docker_ guide in the wiki][netbox-docker-wiki-updating]. If you update for the first time, be sure [to follow our _How To Update NetBox Docker_ guide in the wiki][netbox-docker-wiki-updating].
[releases]: https://github.com/netbox-community/netbox-docker/releases [releases]: https://github.com/MXPicture/docker-netbox/releases
[netbox-docker-wiki-updating]: https://github.com/netbox-community/netbox-docker/wiki/Updating [netbox-docker-wiki-updating]: https://github.com/MXPicture/docker-netbox/wiki/Updating
## Rebuilding the Image ## Rebuilding the Image
@ -150,7 +156,7 @@ If you update for the first time, be sure [to follow our _How To Update NetBox D
For more details on custom builds [consult our wiki][netbox-docker-wiki-build]. For more details on custom builds [consult our wiki][netbox-docker-wiki-build].
[netbox-docker-wiki-build]: https://github.com/netbox-community/netbox-docker/wiki/Build [netbox-docker-wiki-build]: https://github.com/MXPicture/docker-netbox/wiki/Build
## Tests ## Tests