“Contoh DockerFile” Kode Jawaban

Contoh DockerFile

ENV REDIS_VERSION 3.0.5
ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-3.0.5.tar.gz
ENV REDIS_DOWNLOAD_SHA1 ad3ee178c42bfcfd310c72bbddffbbe35db9b4a6

# for redis-sentinel see: http://redis.io/topics/sentinel
RUN buildDeps='gcc libc6-dev make' \
    && set -x \
    && apt-get update && apt-get install -y $buildDeps --no-install-recommends \
    && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /usr/src/redis \
    && curl -sSL "$REDIS_DOWNLOAD_URL" -o redis.tar.gz \
    && echo "$REDIS_DOWNLOAD_SHA1 *redis.tar.gz" | sha1sum -c - \
    && tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \
    && rm redis.tar.gz \
    && make -C /usr/src/redis \
    && make -C /usr/src/redis install \
    && rm -r /usr/src/redis \
    && apt-get purge -y --auto-remove $buildDeps
serhii_rb

Dockerfile Env Variabes

FROM busybox
ENV foo /bar
WORKDIR ${foo}   # WORKDIR /bar
ADD . $foo       # ADD . /bar
COPY \$foo /quux # COPY $foo /quux
Eager Echidna

Dockerfile sederhana

docker build -t springio/gs-spring-boot-docker .Copy
Combative Chinchilla

DockerFile Run App CMD

RUN apt-get install python3
CMD echo "Hello world"
ENTRYPOINT echo "Hello world"
Energetic Echidna

Jawaban yang mirip dengan “Contoh DockerFile”

Pertanyaan yang mirip dengan “Contoh DockerFile”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya