Compare commits
No commits in common. "feat/nonrootuser" and "develop" have entirely different histories.
feat/nonro
...
develop
10
Makefile
10
Makefile
|
@ -21,11 +21,11 @@ docker-run:
|
|||
fake-sms:latest
|
||||
|
||||
docker-release:
|
||||
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)
|
||||
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)
|
||||
|
||||
test:
|
||||
go test -v -race ./...
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
FROM reg.cadoles.com/dh/library/golang:1.22-alpine AS build
|
||||
FROM golang:1.17 AS build
|
||||
|
||||
ARG HTTP_PROXY=
|
||||
ARG HTTPS_PROXY=
|
||||
ARG http_proxy=
|
||||
ARG https_proxy=
|
||||
|
||||
RUN apk update && apk add --no-cache build-base git bash curl python3 nodejs npm
|
||||
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
|
||||
|
||||
COPY . /src
|
||||
|
||||
|
@ -13,22 +16,19 @@ WORKDIR /src
|
|||
|
||||
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
|
||||
|
||||
RUN go install github.com/krishicks/yaml-patch/cmd/yaml-patch@v0.0.10
|
||||
RUN go get github.com/krishicks/yaml-patch/cmd/yaml-patch
|
||||
|
||||
RUN npm install \
|
||||
&& make vendor \
|
||||
&& echo "---" > ./misc/release/config-patch.yml \
|
||||
&& make ARCH_TARGETS=amd64 release
|
||||
|
||||
|
||||
FROM busybox
|
||||
|
||||
RUN adduser -D -h /app sms
|
||||
|
||||
COPY --from=build /src/release/fake-sms-linux-amd64 /app
|
||||
RUN chown -R sms:sms /app
|
||||
|
||||
USER sms
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p /app
|
||||
|
||||
CMD ["bin/fake-sms", "--config", "config.yml"]
|
Loading…
Reference in New Issue