Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
whatwedo GmbH
PHP Alpine
Commits
810eb56c
Commit
810eb56c
authored
Feb 17, 2020
by
mtgto
Browse files
Fix apk add argument "--update" to "--update-cache"
parent
aace1e4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
810eb56c
...
...
@@ -70,15 +70,15 @@ ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-a
## you may join the multiple run lines here to make it a single layer
# make sure you can use HTTPS
RUN
apk
--update
add ca-certificates
RUN
apk
--update
-cache
add ca-certificates
# add the repository, make sure you replace the correct versions if you want.
RUN
echo
"https://dl.bintray.com/php-alpine/v3.9/php-7.3"
>>
/etc/apk/repositories
# install php and some extensions
RUN
apk add
--update
php
RUN
apk add
--update
php-mbstring
RUN
apk add
--update
php-you-extension-name-here
RUN
apk add
--update
-cache
php
RUN
apk add
--update
-cache
php-mbstring
RUN
apk add
--update
-cache
php-you-extension-name-here
```
### Bash / Shell scripting
...
...
@@ -90,7 +90,7 @@ RUN apk add --update php-you-extension-name-here
#!/usr/bin/env sh
# install curl and certificates to download the key
apk add
--update
curl ca-certificates
apk add
--update
-cache
curl ca-certificates
# download the repository public key
curl https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub
-o
/etc/apk/keys/php-alpine.rsa.pub
...
...
@@ -99,9 +99,9 @@ curl https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub -o /etc/apk/keys/p
echo
"https://dl.bintray.com/php-alpine/v3.9/php-7.3"
>>
/etc/apk/repositories
# install packages
apk add
--update
php
apk add
--update
php-redis
apk add
--update
php-any-other-extension
apk add
--update
-cache
php
apk add
--update
-cache
php-redis
apk add
--update
-cache
php-any-other-extension
```
...
...
images/Dockerfile
View file @
810eb56c
...
...
@@ -15,22 +15,22 @@ ARG ALPINE_VERSION
ARG
PHP_VERSION
# ADD SDK AND BASIC TOOLS.
RUN
apk add
--update
alpine-sdk
sudo
git bash nano
RUN
apk add
--update
-cache
alpine-sdk
sudo
git bash nano
# trust this project public key to trust the packages.
ADD
https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
# make sure you can use HTTPS
RUN
apk
--update
add ca-certificates
RUN
apk
--update
-cache
add ca-certificates
# CONFIGURE ALPINE REPOSITORIES AND PHP BUILD DIR.
RUN
echo
"http://dl-cdn.alpinelinux.org/alpine/v
${
ALPINE_VERSION
}
/main"
>
/etc/apk/repositories
&&
\
echo
"http://dl-cdn.alpinelinux.org/alpine/v
${
ALPINE_VERSION
}
/community"
>>
/etc/apk/repositories
&&
\
echo
"https://dl.bintray.com/php-alpine/v
${
ALPINE_VERSION
}
/php-
${
PHP_VERSION
}
"
>>
/etc/apk/repositories
RUN
apk add
--update
\
RUN
apk add
--update
-cache
\
php
\
php-mbstring
# START WITH BASH.
CMD
["/bin/bash"]
\ No newline at end of file
CMD
["/bin/bash"]
sandbox/Dockerfile
View file @
810eb56c
...
...
@@ -17,7 +17,7 @@ ARG APK_PACKAGER
ARG
APK_MAINTAINER
# ADD SDK AND BASIC TOOLS.
RUN
apk add
--update
alpine-sdk
sudo
git bash nano
RUN
apk add
--update
-cache
alpine-sdk
sudo
git bash nano
# CONFIGURE ALPINE REPOSITORIES AND PHP BUILD DIR.
RUN
echo
"http://dl-cdn.alpinelinux.org/alpine/v
${
ALPINE_VERSION
}
/main"
>
/etc/apk/repositories
&&
\
...
...
@@ -65,4 +65,4 @@ ENTRYPOINT ["/bin/start.sh"]
WORKDIR
"/home/sandbox/php-${PHP_VERSION}"
# START WITH BASH.
CMD
["/bin/bash"]
\ No newline at end of file
CMD
["/bin/bash"]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment