Alpine (Go Environment) Docker Base image creation

Source: Internet
Author: User

Installing GLIBC
: https://github.com/sgerrand/alpine-pkg-glibc/

Setting the time zone
RUN echo-e "https://mirror.tuna.tsinghua.edu.cn/alpine/latest-stable/main\n\
Https://mirror.tuna.tsinghua.edu.cn/alpine/latest-stable/community ">/etc/apk/repositories

Install Base Packages

RUN apk update && apk--no-cache add tzdata ca-certificates wget \
&& Cp-r-f/usr/share/zoneinfo/asia/shanghai/etc/localtime
Make base image
Dockerfile

From Alpine:latest
RUN echo-e "https://mirror.tuna.tsinghua.edu.cn/alpine/latest-stable/main\n\
Https://mirror.tuna.tsinghua.edu.cn/alpine/latest-stable/community ">/etc/apk/repositories

Install Base Packages

RUN apk Update && apk--no-cache add tzdata ca-certificates wget \
&& cp-r-f/usr/share/zoneinfo/a Sia/shanghai/etc/localtime
RUN wget-q-o/etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/ Sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && wget https://github.com/sgerrand/alpine-pkg-glibc/ releases/download/2.27-r0/glibc-2.27-r0.apk && apk add glibc-2.27-r0.apk && rm-f glibc-2.27-r0.apk/ Etc/apk/keys/sgerrand.rsa.pub
Docker build-t hub.linuxeye.com/library/alpine:latest. #生成镜像
Docker push Hub.linuxeye.com/library/alpine:latest #推送私有仓库

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.