Public | Automated Build

Last pushed: 8 hours ago
Short Description
Docker image for https://github.com/digitalocean/netbox
Full Description

Netbox docker image

Docker image for NetBox.

Using docker-compose

  1. Create a copy of docker-compose.example.yml
  2. Adapt at least the following environment variables:

    • ALLOWED_HOSTS: accepts multiple hostnames separated using spaces
    • SECRET_KEY: required, should be randomly generated and 50 characters or more

      Optionally you can also change the database password by modifying POSTGRES_PASSWORD and DB_PASS.

  3. Create a new superuser using the following command:

     $ sudo docker-compose run --rm netbox createsuperuser
    
  4. Start the service stack:

     $ sudo docker-compose up -d
    

NetBox will be available under port 8000.

Docker Pull Command
Owner
pitkley
Source Repository

Comments (2)
xiaodi
a year ago

Hello pitkey,

I've updated the seceret_key in the compose file, but I am seeing below errors. Could you please help take a look?

--> sudo docker-compose run --rm netbox superuser

Couldn't import dot_parser, loading of dot files will not be possible.
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(args, **cmd_options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(
args, options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 89, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in init
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 49, in init
self.build_graph()
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 176, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 233, in cursor
cursor = self.make_cursor(self._cursor())
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 204, in _cursor
self.ensure_connection()
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 199, in ensure_connection
self.connect()
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 95, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 199, in ensure_connection
self.connect()
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 171, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 175, in get_new_connection
connection = Database.connect(
conn_params)
File "/usr/local/lib/python2.7/site-packages/psycopg2/init.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL: password authentication failed for user "netbox"

buts101
a year ago

hello
i did
docker pull pitkley/netbox
docker run pitkley/netbox -ti /bin/bash
error msg i got is:
/sbin/entrypoint.sh: line 19: SECRET_KEY: SECRET_KEY needs to be set

Any way to start the image?