Started dockerfile
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
a2fcbb4224
commit
919976073f
|
@ -0,0 +1,15 @@
|
||||||
|
platform: 'linux/amd64'
|
||||||
|
branches: 'main'
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
docker:
|
||||||
|
image: 'plugins/docker'
|
||||||
|
settings:
|
||||||
|
registry: 'git.rustybever.be'
|
||||||
|
repo: 'git.rustybever.be/chewing_bever/lander'
|
||||||
|
tag:
|
||||||
|
- 'latest'
|
||||||
|
mtu: 1300
|
||||||
|
secrets:
|
||||||
|
- 'docker_username'
|
||||||
|
- 'docker_password'
|
31
Dockerfile
31
Dockerfile
|
@ -1,15 +1,40 @@
|
||||||
FROM alpine:3.16.3 AS builder
|
FROM alpine:3.16.3 AS builder
|
||||||
|
|
||||||
|
ARG DI_VER=1.2.5
|
||||||
|
|
||||||
RUN apk add --update --no-cache \
|
RUN apk add --update --no-cache \
|
||||||
build-base \
|
build-base \
|
||||||
make \
|
make \
|
||||||
cmake \
|
cmake \
|
||||||
boost1.78-static
|
boost-dev \
|
||||||
|
curl
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Build dumb-init
|
||||||
|
RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.tar.gz" | tar -xzf - && \
|
||||||
|
cd "dumb-init-${DI_VER}" && \
|
||||||
|
make SHELL=/bin/sh && \
|
||||||
|
mv dumb-init .. && \
|
||||||
|
cd ..
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
RUN make prod && \
|
RUN make prod && \
|
||||||
strip build/Release/lander && \
|
strip build/Release/lander
|
||||||
[ "$(readelf -d build/Release/lander | grep NEEDED | wc -l)" = 0 ]
|
|
||||||
|
|
||||||
|
FROM alpine:3.16.3
|
||||||
|
|
||||||
|
RUN apk add --update --no-cache boost && \
|
||||||
|
mkdir /data && \
|
||||||
|
chown -R 1000:1000 /data
|
||||||
|
|
||||||
|
COPY --from=builder /app/build/Release/lander /app/dumb-init /bin/
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/dumb-init", "--"]
|
||||||
|
CMD ["/bin/lander"]
|
||||||
|
|
Loading…
Reference in New Issue