make container build work
This commit is contained in:
parent
12f55ad721
commit
1fcb035fce
6 changed files with 15 additions and 9 deletions
3
.envrc
3
.envrc
|
|
@ -1,2 +1,3 @@
|
||||||
export TAILSCALESD_ENV_FILE=./.env
|
export TAILSCALESD_ENV_FILE=./dev.env
|
||||||
use nix
|
use nix
|
||||||
|
dotenv
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -8,4 +8,4 @@ tmp/
|
||||||
build
|
build
|
||||||
htmlcov
|
htmlcov
|
||||||
.direnv/
|
.direnv/
|
||||||
.env
|
*.env
|
||||||
|
|
|
||||||
3
Makefile
3
Makefile
|
|
@ -3,9 +3,10 @@ SRC := tailscalesd
|
||||||
TESTS := tests
|
TESTS := tests
|
||||||
SHELL := $(shell which bash)
|
SHELL := $(shell which bash)
|
||||||
APP_VERSION := $(shell git rev-parse --short HEAD)
|
APP_VERSION := $(shell git rev-parse --short HEAD)
|
||||||
|
DOCKER ?= docker
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile \
|
DOCKER_BUILDKIT=1 $(DOCKER) build -f docker/Dockerfile \
|
||||||
--build-arg=$(APP_VERSION) \
|
--build-arg=$(APP_VERSION) \
|
||||||
-t tailscalesd:latest \
|
-t tailscalesd:latest \
|
||||||
.
|
.
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,9 @@ USER ${APP}
|
||||||
WORKDIR ${APP_BASE}/${APP}
|
WORKDIR ${APP_BASE}/${APP}
|
||||||
COPY --chown=${APP}:${APP} requirements.frozen.txt requirements.frozen.txt
|
COPY --chown=${APP}:${APP} requirements.frozen.txt requirements.frozen.txt
|
||||||
RUN pip3 install -r requirements.frozen.txt
|
RUN pip3 install -r requirements.frozen.txt
|
||||||
COPY --chown=${APP}:${APP} gm gm
|
COPY --chown=${APP}:${APP} tailscalesd tailscalesd
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||||
CMD /usr/bin/env python3 -m tailscalesd.main:main
|
|
||||||
USER ${APP}
|
USER ${APP}
|
||||||
ARG APP_VERSION
|
ARG APP_VERSION
|
||||||
ENV APP_VERSION="${APP_VERSION}"%
|
ENV APP_VERSION="${APP_VERSION}"
|
||||||
|
|
|
||||||
5
docker/entrypoint.sh
Normal file
5
docker/entrypoint.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e;
|
||||||
|
|
||||||
|
cd /srv/tailscalesd;
|
||||||
|
exec /usr/bin/env python3 -m tailscalesd.main:main "$@"
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "tailscalesd"
|
name = "tailscalesd"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = "Discover services to monitor with prometheus over tailscale"
|
||||||
authors = ["Abel Luck <abel@guardianproject.info>"]
|
authors = ["Abel Luck <abel@guardianproject.info>"]
|
||||||
include = ["LICENSE.MD"]
|
include = ["LICENSE.MD"]
|
||||||
exclude = ["tests"]
|
exclude = ["tests"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
homepage = "https://gitlab.com/guardianproject-ops/py-tailscalesd"
|
homepage = "https://gitlab.com/guardianproject-ops/tailscalesd"
|
||||||
repository = "https://gitlab.com/guardianproject-ops/py-tailscalesd"
|
repository = "https://gitlab.com/guardianproject-ops/tailscalesd"
|
||||||
packages = [
|
packages = [
|
||||||
{ include = "tailscalesd"}
|
{ include = "tailscalesd"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue