Skip to content

Commit

Permalink
Update base images
Browse files Browse the repository at this point in the history
  • Loading branch information
zdevaty committed Oct 27, 2023
1 parent 069a969 commit 51746b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,20 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FROM golang:1.18-alpine3.15 AS build
FROM eliona/base-golang:latest-1-alpine AS build

RUN apk add git

WORKDIR /
COPY . ./

RUN go mod download
RUN go build -o ../app

RUN DATE=$(date) && \
GIT_COMMIT=$(git rev-list -1 HEAD) && \
go build -ldflags "-X 'thingdust/apiservices.BuildTimestamp=$DATE' -X 'thingdust/apiservices.GitCommit=$GIT_COMMIT'" -o ../app

FROM alpine:3.15 AS target
FROM eliona/base-alpine:latest AS target

COPY --from=build /app ./
COPY conf/*.sql ./conf/
Expand Down

0 comments on commit 51746b3

Please sign in to comment.