This repository has been archived by the owner on Aug 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Added x86 build for loc #8
Open
jimfromsa
wants to merge
2
commits into
master
Choose a base branch
from
docker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
FROM multiarch/alpine:x86-v3.7 | ||
MAINTAINER wessel<[email protected]> | ||
|
||
ENV IOP_VERSION v1.2-Beta | ||
ENV IOP_PLATFORM linux-64 | ||
|
||
|
||
# Ports for node2node, client2node, interprocess communication between local services | ||
EXPOSE 16980 | ||
EXPOSE 16981 | ||
EXPOSE 16982 | ||
|
||
|
||
# Public node id, should be an SHA256 hash of the public key of this node | ||
#ENV NODEID | ||
|
||
# TCP port to serve client (i.e. end user) queries. Optional,default value: 16981 | ||
ENV CLIENTPORT 16981 | ||
|
||
# TCP port to serve other IoP services running on this node. Optional, default value: 16982 | ||
ENV LOCALPORT 16982 | ||
|
||
# TCP port to serve node to node communication. Optional, default value: 16980 | ||
#Should only be locally available | ||
ENV NODEPORT 16980 | ||
|
||
ENV IOPLOC_PATH "/data/locnet/" | ||
|
||
# Path to config file to load options from. Optional, default value: ~/.iop-locnet/iop-locnet.cfg | ||
ENV CONFIGFILE "/data/locnet/iop-locnet.cfg" | ||
|
||
#Path to db file. Optional, default value: ~/.iop-locnet/locnet.sqlite | ||
ENV DBPATH "/data/locnet/iop-locnet.sqlite" | ||
|
||
# Path to log file. Optional, default value: ~/.iop-locnet/debug.log | ||
ENV LOGPATH "/data/locnet/debug.log" | ||
|
||
# Externally accessible IP address (ipv4 or v6) to be advertised for other nodes or clients. Required for seeds only, autodetected otherwise. | ||
#ENV HOST | ||
|
||
# GPS latitude of this server as real number from range ((-90,90) | ||
#ENV LATITUDE 48.2081743 | ||
|
||
# GPS longitude of this server as real number from range (-180,180) | ||
#ENV LONGITUDE 16.3738189 | ||
|
||
# Host name of seed node to be used instead of default seeds. You can repeat this option to define multiple custom seed nodes. | ||
#ENV SEEDNODE | ||
|
||
#allows specifying any network device considered as local network instead of localhost | ||
ENV LOCALDEVICE "127.0.0.1" | ||
|
||
|
||
|
||
#add glibc | ||
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \ | ||
ALPINE_GLIBC_PACKAGE_VERSION="2.26-r0" && \ | ||
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ | ||
wget \ | ||
"https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \ | ||
-O "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
wget \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
apk add --no-cache \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
\ | ||
rm "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true && \ | ||
echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh && \ | ||
\ | ||
apk del glibc-i18n && \ | ||
\ | ||
rm "/root/.wget-hsts" && \ | ||
apk del .build-dependencies && \ | ||
rm \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" | ||
|
||
# Protobuf 3.5 | ||
RUN apk add --update protobuf protobuf-dev \ | ||
&& /usr/glibc-compat/sbin/ldconfig | ||
|
||
|
||
# Get the loc sourcecode | ||
COPY . iop-locnet | ||
ADD docker/run.sh run.sh | ||
|
||
RUN apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ g++ make automake autoconf libspatialite-dev cmake sqlite-dev linux-headers \ | ||
&& cd /iop-locnet/generated && ./regenerate.sh && cd .. \ | ||
&& rm -rf build && mkdir build && cd build && cmake .. && make install \ | ||
&& cd / rm -r iop-locnet && apk del g++ make automake autoconf cmake protobuf-dev linux-headers && rm -rf /var/cache/apk/* \ | ||
&& chmod +x run.sh && mkdir -p $IOPLOC_PATH \ | ||
&& adduser -D -h $IOPLOC_PATH -u 1000 iop \ | ||
&& chown iop:iop $IOPLOC_PATH && chmod 755 $IOPLOC_PATH && chown iop:iop /usr/local/bin/iop-locnetd | ||
|
||
# Call uid 1000 "loc" | ||
USER iop | ||
|
||
# Expose the fs-repo as a volume. | ||
# We're doing this down here (and not at the top), | ||
# so that the overlay directory is owned by the loc user. | ||
# start_loc initializes an ephemeral fs-repo if none is mounted, | ||
# which is why uid=1000 needs write permissions there. | ||
VOLUME $IOPLOC_PATH | ||
ENTRYPOINT "/run.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
image: libertaria/iop-loc:latest | ||
manifests: | ||
- | ||
image: libertaria/iop-loc:2.0.0-rc1 | ||
image: libertaria/iop-loc:amd64-v2.0.0 | ||
platform: | ||
architecture: amd64 | ||
os: linux | ||
- | ||
image: libertaria/iop-loc:2.0.0-rc1 | ||
image: libertaria/iop-loc:arm7-v2.0.0 | ||
platform: | ||
architecture: arm | ||
os: linux | ||
- | ||
image: libertaria/iop-loc:x86-v2.0.0 | ||
platform: | ||
architecture: 386 | ||
os: linux |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on local availability is wrong here, it should stand with the LocalPort as its name also clearly states.