Skip to content

Commit

Permalink
Changed: If you use "$ make docker", build mimixbox binary in docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Nov 29, 2021
1 parent db98faa commit e624e4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e624e4a

Please sign in to comment.