2 Commits

Author SHA1 Message Date
79836b065a feat(docker): using reg.cadoles.com to publish image 2024-02-26 15:20:26 +01:00
725fea2387 fix(dockerfile): updating build image
make the build faster and lighter
2024-02-26 14:56:58 +01:00
2 changed files with 8 additions and 11 deletions

View File

@@ -21,11 +21,11 @@ docker-run:
fake-sms:latest
docker-release:
docker tag fake-sms:latest cadoles/fake-sms:latest
docker tag fake-sms:latest cadoles/fake-sms:$(DOCKER_DATE_TAG)
docker login
docker push cadoles/fake-sms:latest
docker push cadoles/fake-sms:$(DOCKER_DATE_TAG)
docker tag fake-sms:latest reg.cadoles.com/cadoles/fake-sms:latest
docker tag fake-sms:latest reg.cadoles.com/cadoles/fake-sms:$(DOCKER_DATE_TAG)
docker login reg.cadoles.com
docker push reg.cadoles.com/cadoles/fake-sms:latest
docker push reg.cadoles.com/cadoles/fake-sms:$(DOCKER_DATE_TAG)
test:
go test -v -race ./...

View File

@@ -1,14 +1,11 @@
FROM reg.cadoles.com/dh/library/golang:1.17 AS build
FROM reg.cadoles.com/dh/library/golang:1.22-alpine AS build
ARG HTTP_PROXY=
ARG HTTPS_PROXY=
ARG http_proxy=
ARG https_proxy=
RUN apt-get update && apt-get install -y build-essential git bash curl python2
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
RUN apk update && apk add --no-cache build-base git bash curl python3 nodejs npm
COPY . /src
@@ -16,7 +13,7 @@ WORKDIR /src
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
RUN go get github.com/krishicks/yaml-patch/cmd/yaml-patch
RUN go install github.com/krishicks/yaml-patch/cmd/yaml-patch@v0.0.10
RUN npm install \
&& make vendor \