/
Dockerfile
34 lines (26 loc) 路 917 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# WARNING: This Dockerfile is not meant to be used to build the Docker image manually
FROM alpine:3.16.0
# Set env variables
ENV PATH="/cg:${PATH}"
ENV TERM="xterm-256color"
ENV COMPOSE_GENERATOR_DOCKERIZED=1
# Specify volumes
VOLUME /cg/out /var/run/docker.sock
# Set default arg value
ARG ARCH=amd64
# Prepare container
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
WORKDIR /cg/out
# Install Docker CLI
RUN apk add --no-cache docker-cli
# Install CCom
RUN apk add curl
RUN curl -fsSL https://github.com/compose-generator/ccom/releases/latest/download/ccom_${ARCH}.apk -o ccom.apk
RUN apk add --allow-untrusted ccom.apk; rm ccom.apk
RUN apk update && apk add --no-cache libc6-compat libstdc++ && rm -rf /var/cache/apk/*
# Copy sources
COPY compose-generator /cg/cg
COPY predefined-services/ /cg/predefined-services/
RUN chmod +x /cg/cg
# Set entrypoint
ENTRYPOINT [ "cg" ]