chore: Add dockerfile for deployment (#180)

This just adds a very simple dockerfile for deploying `coderd` (and later `provisionerd`). 

This adds a `deploy` directory at the root, and a `make docker/build` command to the makefile.

Thanks @jawnsy for the all the help 😄
This commit is contained in:
Bryan
2022-02-07 15:25:50 -08:00
committed by GitHub
parent 4304d7d831
commit b75ffdcc0b
4 changed files with 90 additions and 10 deletions
+6 -1
View File
@@ -3,7 +3,7 @@ bin/coderd:
go build -o bin/coderd cmd/coderd/main.go
.PHONY: bin/coderd
build: site/out bin/coderd
build: site/out bin/coderd
.PHONY: build
# Runs migrations to output a dump of the database.
@@ -17,6 +17,11 @@ database/generate: fmt/sql database/dump.sql database/query.sql
cd database && gofmt -w -r 'Queries -> sqlQuerier' *.go
.PHONY: database/generate
docker/image/coder: build
cp ./images/coder/run.sh ./bin
docker build --network=host -t us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest -f images/coder/Dockerfile ./bin
.PHONY: docker/build
fmt/prettier:
@echo "--- prettier"
# Avoid writing files in CI to reduce file write activity