From 35f469d2981d34136474cd37df3f88065a83985d Mon Sep 17 00:00:00 2001 From: John Ritsema Date: Mon, 31 Jul 2023 14:56:55 -0400 Subject: [PATCH] updates docker build/run --- Dockerfile | 9 ++++----- Makefile | 14 ++++++++++---- css/output.css | 14 +++++++++++++- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 925e9ae..449554f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ FROM golang:1.20.4 AS build WORKDIR /go/src/app COPY . . -ENV CGO_ENABLED=0 GOOS=linux +ENV CGO_ENABLED=0 GOOS=linux GOPROXY=direct RUN go build -v -o app . -FROM alpine:latest -WORKDIR /root/ -COPY --from=build /go/src/app/app . -CMD ["./app"] +FROM scratch +COPY --from=build /go/src/app/app /go/bin/app +ENTRYPOINT ["/go/bin/app"] diff --git a/Makefile b/Makefile index 5118a24..98a9197 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ PACKAGES := $(shell go list ./...) +name := $(shell basename ${PWD}) all: help @@ -32,10 +33,15 @@ test: build: test go build -o ./app -v -## dockerbuild: build project into a docker container image -.PHONY: dockerbuild -dockerbuild: test - docker-compose build +## docker-build: build project into a docker container image +.PHONY: docker-build +docker-build: test + GOPROXY=direct docker buildx build -t ${name} . + +## docker-run: run project in a container +.PHONY: docker-run +docker-run: + docker run -it --rm -p 8080:8080 ${name} ## start: build and run local project .PHONY: start diff --git a/css/output.css b/css/output.css index 76e479a..49acdd7 100644 --- a/css/output.css +++ b/css/output.css @@ -1,5 +1,5 @@ /* -! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com +! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */ /* @@ -191,6 +191,10 @@ select, textarea { font-family: inherit; /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ font-size: 100%; /* 1 */ font-weight: inherit; @@ -341,6 +345,14 @@ menu { padding: 0; } +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + /* Prevent resizing textareas horizontally by default. */