Commit Graph

82 Commits

Author SHA1 Message Date
Wellyas dd01e3c227 Enable SAML & OPENIDCONNECT for social-auth-core 2022-11-11 13:07:14 +01:00
Tobias Genannt 1418808930 Installed bzip2
In the Wiki backup section we use bzip2 in some of the examples. So it should be installed in the image.
2022-08-31 14:11:05 +02:00
Tobias Genannt 6f1d46d765 Initializers are now a plugin 2022-08-30 16:01:43 +02:00
Tobias Genannt 9ae3282dcf Install libldap-common
This installs the LDAP configurationn file which is needed to load the trusted root certificates from the system.
2022-07-21 09:13:11 +02:00
Tobias Genannt 45e7f6a30c Using Ubuntu 22.04 because Debian has old packages
With Debian the Quay.io security checker found several issues in the
image. With Ubuntu we have never versions of all packages and therefore
less (or no) issues.
2022-07-19 09:42:56 +02:00
Tobias Genannt 901ac05e99 Added our Python venv to the PATH variable
Now users can run "manage.py" without specifying the full path.
2022-07-13 15:53:56 +02:00
Tobias Genannt 5b8bf780df Updated image labels and build script 2022-06-15 16:18:21 +02:00
Tobias Genannt 14c30fb81c Changed the ignored warnings 2022-06-15 09:04:00 +02:00
Tobias Genannt dcf0bdb950 Added psycopg2 as additionnal dependency
With psycopg2-binary the images doesn't work on ARM64.
2022-06-10 10:38:21 +02:00
Tobias Genannt 9e2f4313fb First version of Debian based image 2022-06-10 09:31:41 +02:00
Tobias Genannt 297aab1fd3 Fixed build for Netbox feature branch 2022-02-02 16:49:29 +01:00
Tobias Genannt ef98ad54fa Install postgresql-client
Make usage of 'manage.py dbshell' possible
2021-10-14 15:37:30 +02:00
Christian Mäder daaea77144
Merge pull request #589 from tobiasge/user-unit
Fix #586: Use user name instead of userid
2021-10-06 17:25:47 +02:00
Christian Mäder 24363b653f Remove openssl-dev from Dockerfile
It is pulled by postgresql-dev anyway
In the upcoming alpine, openssl v3 will be
the default, but postgresql-dev will still
require openssl v1.x.
This creates a conflict, which can be resolved
if postgresql-dev can choose the openssl version
it depends on.
2021-10-05 09:47:55 +02:00
Tobias Genannt 5679ab435f Use user name instead of userid
Nginx unit needs the user and group parameter as names.
2021-09-24 08:16:07 +02:00
Tobias Genannt a8b6883183 Changed entrypoint to "tini". 2021-09-13 08:51:23 +02:00
Tobias Genannt 58debafa8a Added container for Netbox housekeeping command
Adds an additional container in which the new "housekeeping" command from
Netbox v3.0.0 is run.
2021-09-03 12:48:30 +02:00
Christian Mäder 9255afd060 Improves google-cloud-storage performance
And also fixes the build by providing a 'alpine version'
of the google/crc32c library, which google-crc32c and
google-cloud-storage and ultimately django-storages[google]
depend on.
2021-09-03 09:15:41 +02:00
Tobias Genannt 9d476fa9af Build documentation files in the image 2021-08-21 18:22:24 +02:00
Tobias Genannt b2ee468871 Alpine update to 3.14 2021-07-07 09:44:21 +02:00
Tobias Genannt 02f30f3a68 'ttf-ubuntu-font-family' was remove from Alpine 2021-05-18 09:34:44 +02:00
Christian Mäder 493fc60401 Use black as formatter for python files 2021-02-08 18:24:29 +01:00
Christian Mäder 5343eaae65 Fix building cryptography pip 2021-02-08 09:03:33 +01:00
Robin Schneider ee40e339c8
NetBox should always be referred to as NetBox
Fix all instances of "Netbox".

```Shell
git ls-files -z . | xargs --null -I '{}' find './{}' -type f -print0 | xargs --null sed --in-place --regexp-extended 's#Netbox#NetBox#g;'
```

Ref: https://netbox.readthedocs.io/en/stable/development/style-guide/#branding
2021-02-04 21:48:08 +01:00
Tobias Genannt d273391773 Gunicorn is replaced with nginx-unit
We now serve Netbox with an nginx-unit instance instead of Gunicorn.
This allows us to get rid of the extra Nginx container because Unit is
also serving the static files. The static files are now collected at container
buildtime instead of every startup.
2021-01-15 09:22:22 +01:00
Christian Mäder 43c05d816d Dynamically load configuration files 2020-10-20 20:46:43 +02:00
Tobias Genannt a6584d2874
Merge pull request #274 from tobiasge/optimise-builds
Optimise builds
2020-05-15 13:57:43 +02:00
ibeljakov 1c65f7af10 Dockerfile: Fixed file permissions for media 2020-04-18 17:08:42 +03:00
Tobias Genannt 8e34f46bad Add checks to verifiy if a new build is needed
This checks if the source materials (python image, Netbox commit,
netbox-docker commit) have changed since the last build. This check is done
by comparing the digest and commit ids from the previous image with the
given tag to the current values taken from the Git and Docker repositories.

The checks are only performed for builds by the automated builds on Github.
2020-04-08 15:50:06 +02:00
Christian Mäder 355f9d4cf7 Prepare for Netbox 2.7 2020-01-20 08:39:26 +01:00
Christian Mäder 0a9991de96
Merge pull request #186 from netbox-community/non-root
Non root
2019-12-20 14:21:34 +01:00
Christian Mäder 8664e42233 Revert "Fix #179 'libc not found'"
This reverts commit feb810ab27.
2019-11-26 11:40:10 +01:00
Christian Mäder 7942e9edbe Remove the named user, change permissions to 'g+w' 2019-11-26 11:24:12 +01:00
Christian Mäder 01c4137dc9 Adds netbox user 2019-11-26 11:24:12 +01:00
Christian Mäder caaa68234c Adds more labels to the Dockerfile
It also updates the README and the bug_report template to reflect
the changes. Additionally, in the README some relevant shields from
shields.io are added.

The labels follow [label-schema.org][lsorg] and the [OpenContainer
image spec, section annotations][ocis], specifications.

[lsorg]: http://label-schema.org/rc1/
[ocis]: https://github.com/opencontainers/image-spec/blob/master/annotations.md
2019-11-17 17:13:29 +01:00
Tobias Genannt feb810ab27 Fix #179 'libc not found'
Gunicorn version 20 crashes in this docker image. So for now use a
version <20.
2019-11-11 08:53:11 +01:00
Tobias Genannt f9662a1e4b Optimize pip install command
As mentioned by @sdktr the "--install-option" is redundant. The added
"--no-warn-script-location" is used to silence warnings when installing
into a directory that is not on $PATH.
2019-10-31 10:11:33 +01:00
Tobias Genannt e3f632d77f Fixes #170 - "drf-yasg" installed into wrong dir
With the new multistage build the pip install command put some packages
in the wrong directory. This resuled in them not being copied into the
runtime images. This commit add the additional "--prefix" option to the
install command. After that all test run and we no longer get the error
"ModuleNotFoundError: No module named 'drf_yasg'".
2019-10-24 17:02:23 +02:00
Nguyễn Trọng Vĩnh eb0f704ebe Remove trailing space in Dockerfile 2019-10-23 11:46:26 +07:00
Christian Mäder 20109c3392 Checkout the repository with git
This changes the build process even further. Instead
f using `wget` to fetch the current code, `git` is used.
This allows for faster switching between branches,
because only the differences between them have to be
fetched from the server.

But the main advantage is that the build cache can
finally be used as designed by Docker. Repetitive
builds are very fast now. This is also true between
branches and tags, as long as the `requirements.txt`
file doesn't change.
2019-10-15 00:34:15 +02:00
Christian Mäder f3b9c34e3b externalize netbox download with wget 2019-10-15 00:34:15 +02:00
Christian Mäder d0ebb34432 Refactor to multistage builds
This commit introduces a huge change in the build process.

What changed:

- Dockerfile.ldap was integrated into Dockerfile as a seperate
  [build stage][multistage-build].
- All the build scripts were refactored according to this.
- The `docker-compose.yml` file was adjusted likewise.
- The main build script, `/build.sh`, now always builds all
  targets (formerly called variants).
- The minimal requirements for Docker and docker-compose
  have increased.
- The build on hub.docker.com must be adjusted.

This change should also fix #156 permanently.

[multistage-build]: https://docs.docker.com/develop/develop-images/multistage-build/
2019-10-15 00:34:15 +02:00
takumin 7f22d21d5d fix AttributeError for ruamel.yaml 2019-07-30 20:09:02 +09:00
Tobias Genannt 135d29e06f Update base image
This updates the base image to Alpine 3.10 with Python 3.7
2019-07-05 08:22:25 +02:00
Christian Mäder dc3db2d9fd %s/digitalocean/netbox-community/gi
Thank you Digitalocean for sponsoring Netbox!
And thank you for letting it grow up and move out ;)
2019-07-02 21:32:58 +02:00
Christian Mäder dfd30f5eae Explain caching strategy in Dockerfile comments 2019-06-12 17:53:35 +02:00
Robert Ellegate a086c2fc22
Changing REF_URL to use HEAD/TAG agnostic API
Per [dicsuccion](https://github.com/netbox-community/netbox-docker/pull/137#issuecomment-495667921) with @cimnine, changing the API endpoint to one that retains functionality of previous URL while supporting both HEADS and TAGS
2019-05-28 10:45:10 -04:00
Robert Ellegate e33a2d2c0a
Adding REF to GitHub repo HEAD for cache busting
After installing requirements, check if  HEAD has changed and bust cache for RUN instruction for wget  archive
2019-05-23 11:20:39 -04:00
Christian Mäder 821fb5f36e Caching of requirements.txt
After [a discussion][1] with rje6459 on the networktocode Slack
in the #netbox-docker channel we've come up with a small improvement
to those that regularly have to build netbox docker locally.

It fetches the "requirements.txt" from the desired branch before
downloading netbox itself.

[1]: https://networktocode.slack.com/archives/CD23LP8BC/p1558537080023200
2019-05-22 18:05:54 +02:00
Christian Mäder 6c3db3deff Update django to 2.2 2019-05-09 09:57:01 +02:00