Skip to content

Instantly share code, notes, and snippets.

@ofen
ofen / Dockerfile
Created September 29, 2020 15:28
AIOHTTP alpine docker
FROM python:3-alpine
WORKDIR /app
COPY . .
RUN adduser appuser --disabled-password \
--gecos "" --home /nonexistent \
--shell /sbin/nologin --no-create-home \
--uid 1000 \
@ofen
ofen / go-gitlab-ci.yml
Last active March 31, 2022 16:16
.gitlab-ci.yml for golang projects w/ private modules
---
build:
variables:
GOPRIVATE: git.example.com/*
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stage: build
script:
- mkdir -p /kaniko/.docker

Create self-signed certificate

openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout server.key -out server.crt -subj "/CN=example.com" \
-addext "subjectAltName=DNS:example.com,DNS:www.example.net,IP:10.0.0.1"

View certificate and key

Certificate