2022年8月15日月曜日

Automatically set timezone when you use Dockerfile

 In the other day , I tried to build a docker image using following Dockerfile.

But I was prevented from a cause I didn't know.


Dockerfile I used
FROM ubuntu:latest

RUN apt-get update \ 
&& apt-get install -y clang clang-12 \ 
&& apt-get install -y neovim git wget curl imagemagick wireshark tshark unzip gdb net-tools

I show a measure for it.

 

What I did


I modified the Dockerfiles as follows , then I was successful in building a docker images.
 
More precisely, I added the line startting from 'ENV' , installing tzdata before installing some package.
 
Modified Dockerfile  
FROM ubuntu:latest

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \ 
&& apt-get install -y tzdata \
&& apt-get install -y clang clang-12 \ 
&& apt-get install -y neovim git wget curl imagemagick wireshark tshark unzip gdb net-tools

0 件のコメント:

コメントを投稿