Commit a02a0d71 authored by vicotor's avatar vicotor

add file

parent da212b35
FROM golang:1.22-alpine AS build
# Install dependencies
RUN apk update && \
apk upgrade && \
apk add --no-cache bash git openssh make build-base
WORKDIR /build
ADD . /build/twitter_syncer
RUN cd /build/twitter_syncer && make && cp build/bin/twitter_syncer /twitter_syncer
FROM alpine
WORKDIR /root
COPY --from=build /twitter_syncer /usr/bin/twitter_syncer
#COPY ./app.json /root/app.json
ENTRYPOINT [ "twitter_syncer" ]
\ No newline at end of file
.PHONY: default twitter_syncer docker
GOBIN = $(shell pwd)/build/bin
GO ?= latest
GOFILES_NOVENDOR := $(shell go list -f "{{.Dir}}" ./...)
TAG=latest
default: twitter_syncer
all: twitter_syncer docker
twitter_syncer:
go build -o=${GOBIN}/$@ -gcflags "all=-N -l" .
@echo "Done building."
docker:
docker build -t twitter_syncer:${TAG} .
clean:
rm -fr build/*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment