This is a dockerfile writtenfor a alpine base image. I need to rewrite it to run on a ubuntu:20.04 base image.
# Build
FROM alpine:3.17 as builder
RUN apk update &&
apk --no-cache add
ca-certificates
cmake
g++
make
linux-headers
RUN apk add libcluon --no-cache --repository
https://chrberger.github.io/libcluon/alpine/v3.13 --allow-untrusted
ADD . /opt/sources
WORKDIR /opt/sources
RUN mkdir /tmp/build && cd /tmp/build &&
cmake /opt/sources &&
make && make test && cp helloworld /tmp
# Deploy
FROM alpine:3.17
RUN apk update &&
apk --no-cache add
libstdc++
COPY --from=builder /tmp/helloworld /usr/bin
CMD ["/usr/bin/helloworld"]
'''
I tried replacing all the apk commands with apt but i keep getting errors saying failed to solve on different lines each time i change the code.
New contributor
Ganapati Kamat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1