docker build . \
--file alpine.Dockerfile \
--tag "dnclient:alpine-latest" \
--tag "dnclient:latest"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3 | |
WORKDIR /usr/src/app | |
COPY requirements.txt ./ | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
ENTRYPOINT [ "python", "./main.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmaguire@scorpion [05:56:26 PM] [~/src/nebula/cert] [pkey-benchmarking] | |
-> % go test -bench=. -benchtime=10x | |
go: downloading github.com/golang/protobuf v1.4.1 | |
go: downloading google.golang.org/protobuf v1.25.0 | |
go: downloading golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 | |
goos: linux | |
goarch: amd64 | |
pkg: github.com/slackhq/nebula/cert | |
cpu: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | |
BenchmarkAes256DeriveKey-8 10 2058243018 ns/op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import re | |
from collections import namedtuple | |
from operator import attrgetter | |
import requests | |
DOWNLOAD_DIR = os.path.join(os.path.realpath(os.path.dirname(__file__)), | |
'downloads') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
encrypted_root=0 | |
encrypted_home=0 | |
# Determine what is mounted at / and /home | |
root_mount="$(findmnt --noheadings --raw --target / | awk '{ print $2 }')" | |
home_mount="$(findmnt --noheadings --raw --target /home | awk '{ print $2 }')" | |
# check if root |