Create Custom Docker Alpine Image

Create Custom Docker Alpine Image

Content Index :

Create Custom Docker Alpine Image
Tag : docker , By : Thaweesak Suksuwan
Date : November 24 2020, 05:44 AM

I wish this help you Found it. You can install any packages by giving repository as a parameter.
FROM alpine:3.7  
RUN apk add libgdiplus-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Docker/alpine: How to install nodeJS 4.8.4 at alpine image

Tag : node.js , By : user176691
Date : March 29 2020, 07:55 AM
wish help you to fix your issue You have two alternatives:
Using the alpine 3.5 image, build nodejs from source Use the node:4.8.4-alpine then update it to alpine 3.6
FROM alpine:3.5


RUN addgroup -g 1000 node \
    && adduser -u 1000 -G node -s /bin/sh -D node \
    && apk add --no-cache \
        libstdc++ \
    && apk add --no-cache --virtual .build-deps \
        binutils-gold \
        curl \
        g++ \
        gcc \
        gnupg \
        libgcc \
        linux-headers \
        make \
        python \
  # gpg keys listed at https://github.com/nodejs/node#release-team
  && for key in \
    9554F04D7259F04124DE6B476D5A82AC7E37093B \
    94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
    FD3A5288F042B6850C66B31F09FE44734EB7990E \
    71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
    DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
    B9AE9905FFD7803F25714661B63B535A4C206CA9 \
    C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
    56730D5401028683275BD23C23EFEFE93C4CFFFE \
  ; do \
    gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
    gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
  done \
    && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
    && curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
    && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
    && grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
    && tar -xf "node-v$NODE_VERSION.tar.xz" \
    && cd "node-v$NODE_VERSION" \
    && ./configure \
    && make -j$(getconf _NPROCESSORS_ONLN) \
    && make install \
    && apk del .build-deps \
    && cd .. \
    && rm -Rf "node-v$NODE_VERSION" \
    && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt


RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
  && for key in \
    6A010C5166006599AA17F08146C2130DFD2497F5 \
  ; do \
    gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
    gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
  done \
  && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
  && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
  && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
  && mkdir -p /opt/yarn \
  && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
  && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
  && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
  && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
  && apk del .build-deps-yarn

CMD [ "node" ]
  FROM node:4.8.4-alpine
  RUN  sed -i -e 's/v4\.4/v3.5/g' /etc/apk/repositories \
       && apk update \
       && apk add --upgrade apk-tools \
       && apk upgrade --available \
       && rm -rf /var/cache/apk/* 

How to create a dind docker image with azure-cli on Alpine linux?

Tag : kubernetes , By : hammer_1968
Date : March 29 2020, 07:55 AM
seems to work fine I am trying to install the azure-cli in the dind:latest image based on alpine. , This helped me in one of my alpine based image
apk update
apk add bash py-pip
apk add --virtual=build gcc libffi-dev musl-dev openssl-dev python- dev
pip install azure-cli
apk del --purge build

How to install Alpine Linux packages in the gliderlabs/alpine Docker image, when apk add fails?

Tag : docker , By : user171752
Date : March 29 2020, 07:55 AM
around this issue There is no python package available in current Alpine images. If you take a look at the output of apk search --update python, you'll find:
/ # apk search python | grep '^python'
/ # apk add --update python3
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libbz2 (1.0.6-r6)
(2/11) Installing expat (2.2.5-r0)
(3/11) Installing libffi (3.2.1-r4)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing xz-libs (5.2.4-r0)
(6/11) Installing ncurses-terminfo-base (6.1_p20180818-r1)
(7/11) Installing ncurses-terminfo (6.1_p20180818-r1)
(8/11) Installing ncurses-libs (6.1_p20180818-r1)
(9/11) Installing readline (7.0.003-r0)
(10/11) Installing sqlite-libs (3.24.0-r0)
(11/11) Installing python3 (3.6.6-r0)
Executing busybox-1.28.4-r1.trigger
OK: 67 MiB in 24 packages

What is required library needed for installing xmlreader in php:7.2-fpm-alpine custom docker image?

Tag : php , By : Tom Berthon
Date : March 29 2020, 07:55 AM
it should still fix some issue
The XMLWriter extension was initially a PECL extension for PHP 5. It was later added to the PHP source (bundled) as of PHP 5.1.2. This extension is enabled by default.
FROM php:7.2-fpm-alpine

RUN apk add --update libzip-dev libmcrypt-dev libpng-dev libjpeg-turbo-dev libxml2-dev icu-dev postgresql-dev curl-dev libmemcached-dev &&\
    apk add --update --virtual build-dependencies build-base gcc wget autoconf && \
    docker-php-ext-install gd && \
    docker-php-ext-install zip &&\
    docker-php-ext-install xml &&\
    apk del build-dependencies &&\
    rm -rf /var/cache/apk/*

Create non root user in Docker Alpine images with lesser image size?

Tag : node.js , By : Johannes
Date : March 29 2020, 07:55 AM
I wish did fix the issue. One solution is to switch the storage driver from aufs to device mapper as described here.
Alternatively, another solution is to directly copy the resources from the host and set the owner in the same COPY instruction
COPY [--chown=<user>:<group>] <src>... <dest>
Related Posts Related QUESTIONS :
  • How To Mount Directory Of Conainter Into Another After containers are run?
  • I can't run Docker ToolBox on Windows 7
  • How to roll back a deployment to a previous revision automatically when deployment has crossed 'progressDeadlineSeconds'
  • Persist ENV vars across multi-stage Docker builds
  • Copy text file from docker container to host
  • /bin/sh: 1: sudo: not found when running dockerfile
  • Websphere Liberty running on Docker with Open JDK 11
  • Setting up Traefik with Cloudflare
  • Cassandra/Scylla on docker without internet in linux server
  • How to diagnose ECS Fargate task failing to start?
  • The Compose file './docker-compose.yml' is invalid because: Unsupported config option
  • Configure docker run to use ssl / https / tls
  • Traefik middle-wares are not working with docker compose
  • How to write commands with multiple lines in Dockerfile
  • How to start the stopped ubuntu container in docker? (ran without options (-i - t) )
  • Kubernetes resource request/limit values
  • Does Docker swarm ignore VOLUME commands from Dockerfiles?
  • Access a Caddy server by IP
  • How to Configure Kubeconfig based login in Kubernetes Dashboard
  • Changing Redis port in Docker Compose not working
  • Kubernetes - Private Repository deployment issue
  • How do I configure my docker container to run in the browser?
  • Starting docker container results in docker-credential-secretservice: The connection is closed
  • Default IP of AWS Codebuild
  • ForwardAuth Middleware is not working in Traefik as API Gateway
  • Unable to get my Docker image's base image
  • Why is my Kubernetes deployment registering as unavailable even though it runs in Docker?
  • Docker volume backup error: Tar: MYCONTAINER_VOLUME: Cannot stat: No such file or directory
  • Translate docker run into subcomponents
  • Error running docker build for arm32v7 container on amd64 linux machine: standard_init_linux.go:207
  • How run jboss-cli on start docker container with Dockerfile
  • How to restrict that a docker container only listens connection from localhost?
  • Will changing the Linux hostname of a Docker Swarm manager cause it to lose its Swarm Manager status?
  • Why I cannot deploy my app to docker successfully
  • .net core console application using TopShelf
  • how to run docker-compose.yaml on kubernetes?
  • Docker container networking - Kafka Producer
  • What is the different of . and ./ in RUN
  • Running Elasticsearch with Docker
  • Cannot run a Groovy sh command in Jenkins
  • Why there is no logon happens when attach to docker busybox image?
  • Access to container created by docker-compose in same network
  • My docker swarm creates a <none> images on which is keeps running when trying to update
  • Docker build with latest apt package is general?
  • docker-compose is starting containers after host reboot. Which ones?
  • docker-compose on Windows 10: cannot find image?
  • How can I update HTTP_HOST in Apache for Mautic Docker
  • Docker, MySQL - Error 1045, Access denied for use root
  • Customize Hasura Docker Image
  • What is exec in Dockerfile ENTRYPOINT and why is a process started twice without it?
  • Docker doesn't work when using getsentry/sentry-cli
  • Ansible AWX docker container infinite restart
  • How to use docker-compose to build an application on a CI?
  • Error (failed_to_start_child) when running ecto in ejabberd production mode inside docker
  • Use environment files outside the directory to provide parameter during build time with docker-compose
  • Heroku Docker Deploy build args
  • Docker Build Kitura Sqift Container - Shim.h mysql.h file not found
  • Docker Can't Find = in "ENV" Must be of the form: name=value
  • Failed to mount Splunk config On Kubernetes - ERROR: Couldn't read "/opt/splunk/etc/splunk-launch.conf
  • how to assign "container registry" permissions to virtual machine in Google Cloud
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com