Skip to content

Commit

Permalink
fix local build env
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Sep 18, 2022
1 parent ec7bbec commit a269822
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ RUN apt-get update \
&& apt-get -y -f dist-upgrade \
&& apt-get install -y -f \
build-essential \
linux-libc-dev \
gcc-multilib \
g++-multilib \
vim \
nano \
git \
Expand Down Expand Up @@ -64,7 +61,7 @@ RUN go mod download
COPY . /go/src/github.com/webdevops/go-crond

# Build and install
RUN make build-local \
RUN make build \
&& cp -a go-crond /usr/local/bin

ENV SERVER_BIND=":8080" \
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,16 @@ release-assets/%: $(SOURCE)
GOARCH=$(call word-dot,$*,2) \
CGO_ENABLED=0 \
time go build -ldflags '$(LDFLAGS)' -o './release-assets/$(PROJECT_NAME).$(call word-dot,$*,1).$(call word-dot,$*,2)' .

#######################################
# development
#######################################

docker-dev:
docker build -f Dockerfile.develop . -t webdevops/go-crond:develop

docker-run: docker-dev
docker run -ti --rm -w "$$(pwd)" -v "$$(pwd):$$(pwd):ro" -p 8080:8080 -e SERVER_METRICS=1 --name=cron webdevops/go-crond:develop bash

build-env: docker-dev
docker run -ti --rm -w "$$(pwd)" -v "$$(pwd):$$(pwd)" -p 8080:8080 -e SERVER_METRICS=1 --name=cron webdevops/go-crond:develop bash

0 comments on commit a269822

Please sign in to comment.