From e624e4a9473fd312b94c7fab9ce9f779555aedfe Mon Sep 17 00:00:00 2001 From: Nao1215 Date: Mon, 29 Nov 2021 14:55:22 +0900 Subject: [PATCH] Changed: If you use "$ make docker", build mimixbox binary in docker. --- Dockerfile | 8 +++++--- Makefile | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb3d172..3f913c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ -FROM golang +FROM golang as builder +ENV ROOT=/go/src/app +WORKDIR ${ROOT} +# Install mimixbox +RUN go install github.com/nao1215/mimixbox/cmd/mimixbox@latest # Create mimixbox symbolic link in container. -COPY mimixbox /usr/local/bin/ RUN mimixbox --full-install /usr/local/bin/ # Set root password @@ -13,5 +16,4 @@ RUN echo 'mimixbox:password' |chpasswd # If you want to administrator privileges, you become the root user. # RUN echo "mimixbox ALL=(ALL) ALL" >> /etc/sudoers - CMD ["su", "-", "mimixbox"] \ No newline at end of file diff --git a/Makefile b/Makefile index 73218bc..1fc2dda 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ doc: ## Make man-pages ./scripts/mkManpages.sh docker: ## Run container for testing mimixbox - $(MAKE) build CGO_ENABLED=0 docker image build -t mimixbox/test:latest . docker container run --rm -it mimixbox/test:latest